How to use external terminal with IDE when running app

I use VS code and run my scripts on the terminal within VS code. I would assume there is a similar functionality with other IDE’s.

When I run my script to launch my dash app, the ability to type in the terminal is gone (like it is frozen) unless I stop the script from running. This is fine, since I just ‘save’ the app after making a change and it refreshes the running instance of the app.

The problem I have is that I want to run the app through cmd line (windows) by typing python app.py. This works, but I don’t know of a way to refresh the app - there is no way to just ‘save’ and it refreshes - I would have to close the cmd window and redo the whole process.

I hope what I am describing makes sense. Is there a solution to this? thank you

Within your app.py file, where you have the command that runs the server, you can turn on debug mode. Whenever you modify a file in the app, it will auto reload the application with the changes.

if __name__ == "__main__":
    app.run_server(debug=True)
1 Like