question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Always rerun doesn't work with VSCode

See original GitHub issue

Summary

The “Always re-run” button doesn’t seem to work when editing files with VSCode. It only appears the first time after I refresh localhost (and edit my file), which is normal. But, for any further source code edits I need to manually re-run the file (press R inside localhost). This works as intended while editing the file with other file editors (tested on Notepad++, Notepad).

Steps to reproduce

  1. Create new basic main.py file:
import streamlit as st
st.title('My first app')
  1. Start server: streamlit run main.py --server.port=80
  2. Open main.py in VSCode and edit it
  3. Click on Always re-run (the file re-runs and displays the edit)
  4. Edit main.py in VSCode again (this time the file doesn’t re-runs)

Expected behavior:

The result in localhost should have updated based on the edited source code.

Actual behavior:

The localhost generated file doesn’t automatically re-run after editing the main.py file in VSCode.

Gif

Is this a regression?

This is my first time using streamlit.

Debug info

  • Streamlit version: 0.52.2
  • Python version: 3.7.4
  • Using Conda 4.8.1, with pip 19.2.3
  • OS version: Windows 10
  • Browser version: Google Chrome 79.0.3945.117

Additional information

I followed this: https://docs.streamlit.io/getting_started.html#import-streamlit

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
tconklingcommented, Jan 15, 2020

Thanks for the report, @cornelg7!

I can repro this on Windows 10/VSCode 1.4.1. Probably a watchdog issue? We’ll triage it and take a look soon.

0reactions
jrhonecommented, May 14, 2020

@cornelg7 @tconkling could you confirm that upgrading VSCode to 1.45 fixes the issue for you?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tasks in Visual Studio Code
Integrate with External Tools via Tasks. Lots of tools exist to automate tasks like linting, building, packaging, testing, or deploying software systems.
Read more >
Restart task if is already running - visual studio code
Open the command palette (CMD/CTRL + Shift + P or Menu>View>Command Palette) and type "restart", you'll see "Tasks: Restart Running Task".
Read more >
Visual Studio Code doesn't run code - Super User
2 Answers 2 · CTRL+SHIFT+X · Type in search box Code Runner · Install the extension · Than click on File - Preferences...
Read more >
Develop Azure Functions by using Visual Studio Code
If you don't yet have an account, you can create one from the extension in Visual Studio Code. Run local requirements. These prerequisites...
Read more >
Visual Studio Code (Windows) - Setting up a Python ...
In this Python Programming Tutorial, we will be learning how to set up a Python development environment in VSCode on Windows.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found