Ask questionspython without debugging won't start if there is a breakpoint
@tmdag commented on Thu May 02 2019
Open Python code create a breakpoint run python without debugging (ctrl+F5) Terminal output:
cd /home/user/dev/Pytool ; env PYTHONIOENCODING=UTF-8 PYTHONUNBUFFERED=1 /usr/bin/python3 /home/user/.vscode/extensions/ms-python.python-2019.4.11987/pythonFiles/ptvsd_launcher.py --default --nodebug --client --host localhost --port 36019 /home/user/dev/Pytool/mypytool.py Terminated Does this issue occur when all extensions are disabled?: Yes/No Not sure - Python extension is required
Bookmarks 10.4.3 C/C++ 0.221 Gist 3.0.3 Git History 0.4.6 GitLens - 9.6.3 markdownlint 0.26.0
Syncing 2.1.6 OpenCL 0.5.2 VEX 0.4.0 TAML 0.4.0
@jxramos commented on Thu May 02 2019
I'm seeing this too on a MacOS, it immediately exits with
Terminated: 15. This behavior persists even if the breakpoint is disabled/unchecked.
Answer questions fabioz
I'm able to reproduce this (on Linux) with the code below (it seems it can be any script that does not end too fast):
import time while True: time.sleep(.1)
ipcjson.py to see what's going on when it receives the
setBreakpoints and it seems that it does nothing in both cases (when breakpoints are received or not) -- in both cases it just calls
on_invalid_request (from the dummy
MESSAGE_PROCESSOR in ptvsd/runner.py) which just returns
The difference is that afterwards,
ptvsd receives a
disconnect message from VSCode if breakpoints are passed and if no breakpoints are passed it proceeds to receive a
threads (as a note, even by changing the
disconnect in the failing case to do nothing (just send
self.send_response(request, success=True)), the
python process is killed right afterwards anyways).
faulthandler didn't acknowledge any crash in the application.
To me it doesn't seem like the issue lies on
ptvsd (it seems like VSCode is promptly killing the
ptvsd process in the case that breakpoints are passed).
@karthiknadig should this be passed to someone in the VSCode client side?