-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debugger stops on hot reload for Flask in debugger #2148
Comments
@melvinkokxw Thank you for the detailed information! I was able to reproduce your issue. When I set I'll look to see what can be done in the code to mitigate the above shortcomings. |
@bwateratmsft Thank you for investigating the issue and identifying the cause. Setting Not setting that explicitly doesn't remove the container after debug, yet hot reload doesn't work. Is false the default value for |
Hmm, it's supposed to be true by default, so if it's not specified it's still treated as true. I'll check on that as well. |
@melvinkokxw I think I've found what went wrong and how to fix it, with hot reloading. The Python extension somewhat transparently makes two debug sessions--the outer "launch" session, and the inner "attach" session. When you save a file, the outer session is supposed to persist but the inner one is discarded. Our code for removing the container after debug was not able to tell the difference between those two--so when the inner one ended, it would remove the container. I made a change so that we can tell them apart, and will not remove the container when the inner session ends. As for the container not being removed when |
This has been fixed in Docker extension version 1.5.0. |
Issue Type: Bug
Steps to reproduce problem:
task.json given below:
Results
Expected results:
Flask hot reloads.
Actual results:
Last line in debug console is:
* Detected change in '/<python file name>.py', reloading
and then the debugger simply stops.
Apologies but I do not have a code snippet available for copying!
The text was updated successfully, but these errors were encountered: