You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Debugging lines at and after QSignalSpy breaks the debugger, it quits without any error message. signal_emitter = SignalEmitter() spy = QSignalSpy(signal_emitter.xPlaneAddrPortSignal)
start debugger in VSCode 1.93.0 with Python Debugger v2024.10.0
set breakpoint at spy = QSignalSpy(signal_emitter.xPlaneAddrPortSignal) , then press "next" in debugger controls
set breakpoint at print("the end") and press "continue"
the debugger quits without any message before it reaches print("the end") . but when running the program without the debugger, it works just fine.
Diagnostic data
````
2024-09-10 08:44:32.248 [info] DAP Server launched with command: /Users/bodo.teichmann/dev/flightsim_raspi/pyG5/.venv/bin/python /Users/bodo.teichmann/.vscode/extensions/ms-python.debugpy-2024.10.0-darwin-arm64/bundled/libs/debugpy/adapter
2024-09-10 08:44:32.392 [info] Received 'debugpySockets' event from debugpy.
2024-09-10 08:44:32.393 [info] Received 'debugpySockets' event from debugpy.
2024-09-10 08:44:32.395 [info] Received 'debugpySockets' event from debugpy.
2024-09-10 08:44:32.942 [info] Received 'debugpySockets' event from debugpy.
2024-09-10 08:44:38.921 [info] Received 'debugpySockets' event from debugpy.
2024-09-10 08:44:38.922 [info] Received 'debugpySockets' event from debugpy.
```
launch.json configuration
not used `launch.json`, just used "Python Debugger: Python File"
XXX
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
XXX
Output for Python Debugger in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python Debugger)
XXX
Extension version: 2024.10.0
VS Code version: Code 1.93.0 (Universal) (4849ca9bdf9666755eb463db297b69e5385090e3, 2024-09-04T13:02:38.431Z)
OS version: Darwin arm64 23.6.0
Modes:
Python version (& distribution if applicable, e.g. Anaconda): 3.12.3
Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): VirtualEnvironment
found a not pleasant work around:
instead of using spy = QSignalSpy(signal_emitter.xPlaneAddrPortSignal) and spy.wait(), I used loop = QEventLoop() and loop.exec() , that also works with the debugpy, although this solution is more cumbersome.
@bodote, this is likely due to way QSignalSpy pauses execution when you call spy.wiat() while it waits for the signal to be emitted. Debugpy likely does not deal with the blocking wait correctly and exits prematurely.
Since you've found that replacing QSignalSpy with QEventLoop fixes the debugger quitting issue, it suggests that QSignalSpy’s internal handling of signal emissions (even without explicitly using wait()) may interfere with the debugger's ability to manage the Qt event loop correctly.
Hope this helps, alas there isn't a less cumbersome workaround.
Type: Bug
Behaviour
Debugging lines at and after
QSignalSpy
breaks the debugger, it quits without any error message.signal_emitter = SignalEmitter() spy = QSignalSpy(signal_emitter.xPlaneAddrPortSignal)
Steps to reproduce:
start debugger in VSCode 1.93.0 with Python Debugger v2024.10.0
set breakpoint at
spy = QSignalSpy(signal_emitter.xPlaneAddrPortSignal)
, then press "next" in debugger controlsset breakpoint at
print("the end")
and press "continue"the debugger quits without any message before it reaches
print("the end")
. but when running the program without the debugger, it works just fine.Diagnostic data
not used `launch.json`, just used "Python Debugger: Python File"launch.json
configurationOutput for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Output for
Python Debugger
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython Debugger
)Extension version: 2024.10.0
VS Code version: Code 1.93.0 (Universal) (4849ca9bdf9666755eb463db297b69e5385090e3, 2024-09-04T13:02:38.431Z)
OS version: Darwin arm64 23.6.0
Modes:
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: