Open feeefeee opened 11 months ago
I think I am having this same issue. I have a typescript project that is now forever stuck on a breakpoint that I placed. Pressing F5 or clicking the continue button with my mouse does not do anything. This problem does not always happen, but only sometimes for me. It is really hindering my productivity though.
EDIT: Please let me know if I can do anyting to help investigate the issue. I am running on Ubuntu 20.04.06
EDIT2: Oh sorry, I thought that this issue was in VSCode Repo. So, unrelated to python/C++. I am using typescript. Maybe it isn't related to any language, but really a VScode issue?
I realized a funny thing when trying to debug Python scripts running in an embedded interpreter : unless you pass in_process_debug_adapter=True
to debugpy.listen(...)
, debugpy
will try to launch the executable found at _config.get("python", sys.executable)
which, in the embedded scenario, is not Python but the actual executable (C++ in my case). debugpy
assumes that it's Python or at least that it's able to launch Python scripts passed in arguments.
Even though it did not work (obviously), my breakpoint was still hit, but debugging did not really work.
Can you maybe try to check that you are using an in-process adapter by specifying this flag?
(Beware: using in-process adapters seemingly preclude the debugging of sub-processes but, when using embedded Python, I guess launching subprocesses also running Python is a rare occurrence)
Before creating a new issue, please check the FAQ to see if your question is answered there.
Environment data
Actual behavior
When debugging a python script started from an interpreter embedded in a C++ app using pybind11, VSCode, sometimes refuses to continue execution with F5 after a breakpoint is hit. This behavior may occur after hitting 2 to 40 breakpoints.
Expected behavior
Always continue execution when hitting F5 after a breakpoint is hit
Steps to reproduce:
debugging.py
)testing.py
withprint('starting")
andprint('done')
linestesting.py
This is not strictly reproducible with two breakpoints. It can also occur after more than 40 breakpoints hit. This test was performed with
PYDEVD_LOAD_NATIVE_LIB=0
, but similar failures occured wythout this variable in the "real" application.All code in https://github.com/feeefeee/debugpy11/tree/debugpy/1 Logs in https://github.com/feeefeee/debugpy11/tree/debugpy/1/logs/1