-
Notifications
You must be signed in to change notification settings - Fork 67
Remote Debugger Process Not Terminated Upon Debugger Restart #2092
Comments
@Anti-Distinctlyminty Can you share your launch.json configuration for this? |
@karthiknadig Here you go {
"name": "Python: Flask",
"type": "python",
"request": "launch",
"module": "flask",
"env": {
"FLASK_APP": "${workspaceRoot}/src/api/run_api.py",
"FLASK_ENV": "development",
"FLASK_DEBUG": "1"
},
"args": [
"run",
"--no-debugger",
"--no-reload",
"--host=0.0.0.0"
],
"jinja": true
} |
And a quick sample of what I see when I list running processes containing the string 'python' by using myusername 7962 7369 0 Feb18 ? 00:00:00 /home/lukesapi/.vscode-server/bin/c47d83b293181d9be64f27ff093689e8e7aed054/node /home/lukesapi/.vscode-server/extensions/ms-python.python-2020.2.63072/out/client/debugger/debugAdapter/main.js
myusername 10179 7369 0 Feb18 ? 00:00:00 /home/lukesapi/.vscode-server/bin/c47d83b293181d9be64f27ff093689e8e7aed054/node /home/lukesapi/.vscode-server/extensions/ms-python.python-2020.2.63072/out/client/debugger/debugAdapter/main.js
myusername 10632 1 0 Feb17 ? 00:00:00 /home/lukesapi/.vscode-server/bin/c47d83b293181d9be64f27ff093689e8e7aed054/node /home/lukesapi/.vscode-server/extensions/ms-python.python-2020.2.63072/out/client/debugger/debugAdapter/main.js |
This looks like it's using ptvsd 4. Can you try opting into the experiment to get you a newer version of ptvsd, and see if the issue still remains? |
@int19h The instructions on the provided link are a little vague. I added the vsix file to my local windows .vscode/extensions folder, and added
to my settings.json, but it become slightly greyed out and there's no "python.experiments.optInto" autocomplete so I'm almost certain I'm doing this incorrectly. |
Sorry, it is indeed a bit confusing! You need to install the VSIX by using the "Extensions: install from VSIX" command. This is available in the command palette (Ctrl+Shift+P) - just type "VSIX" there, and you should see it. Also, this is a global app-wide option, and thus it must go into the global settings.json - it won't work in the workspace one. If you have the right version of the extension, you should be able to do File -> Preferences -> Settings, select the User tab (if not already selected), and then search for "optInto" to find it. |
After using the experimental debugger the problem seems to be resolved. Thank you. |
Environment data
"python.jediEnabled"
set to; more info How to update the language server to the latest stable version vscode-python#3977): Language serverpython.languageServer
setting: -Expected behaviour
Debugging a flask_restful application, when hitting the debugger's restart button (or hitting Ctrl+Shift+F5) the remote debugging process should be properly terminated, then restarted.
Actual behaviour
Developing remotely from Windows on Ubuntu I have noticed that the debugAdapter/main.js process is never terminated when performing a debug restart. If the debugger is stopped, the process appears to be terminated correctly.
Logs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
; turn on source maps to make any tracebacks be useful by runningEnable source map support for extension debugging
)Note: Nothing is shown in the log on a debug restart. This is printed upon stopping:
The text was updated successfully, but these errors were encountered: