"Restart" in Python debugger does not always exit existing process before starting a new one
See original GitHub issueEnvironment data
- VS Code version: Code 1.24.1 (24f62626b222e9a8313213fb64b10d741a326288, 2018-06-13T17:51:32.889Z)
- Extension version (available under the Extensions sidebar): 2018.6.0
- OS and version: Windows_NT x64 10.0.15063
- Python version (& distribution if applicable, e.g. Anaconda): Python 3.6.5
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): n/a
- Relevant/affected Python packages and their versions: n/a
Actual behavior
Every once in a while, clicking “Restart” in the debugger will not actually restart the existing application. Instead, it will spawn a new debug console and a new instance of the application while the old instance continues to run in the previous debug console.
Expected behavior
Clicking “Restart” on the debugger toolbar should exit the currently running Python process being debugged before starting a new one.
Steps to reproduce:
Create a Python debug configuration like this:
{
"name": "Run Server",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}\\app.py",
}
Now, start your Python application in the debugger.
Try to restart it.
I have not found any consistent way to reproduce this issue - it seems to be random. I will update this issue if I notice a factor that reliably reproduces the issue. It happens about 1 out of every 8 times I restart the application in the debugger.
Logs
Output for Python
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Python
)
N/A - the output is the normal output from the linter, nothing else.
Output from Console
under the Developer Tools
panel (toggle Developer Tools on under Help
)
This is the only error:
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (2 by maintainers)
@flotwig I believe the issue has been resolved. Please could you test this issue with our latest development version of the extension. Instructions for installation of this dev version can be found here https://github.com/Microsoft/vscode-python/blob/master/CONTRIBUTING.md#development-build.
Please feel free to reopen the issue if this persists, else just ping on the issue and we’ll re-open it.
Yes, I think it has been resolved as I was unable to reproduce it for a while after our last talk. Thanks so much guys!