Always rerun doesn't work with VSCode
See original GitHub issueSummary
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
- Create new basic main.py file:
import streamlit as st
st.title('My first app')
- Start server:
streamlit run main.py --server.port=80
- Open main.py in VSCode and edit it
- Click on Always re-run (the file re-runs and displays the edit)
- 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.
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:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
@cornelg7 @tconkling could you confirm that upgrading VSCode to 1.45 fixes the issue for you?