-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QThread debugging regression after version 1.1.0 #526
Comments
I think the issue is that we don't automatically patch qt threads anymore (as it should work when the compiled extensions from the debugger are available in Python 3.6 -- as it's not working for you, the compiled extensions are probably not available). See: #304 (comment) for how to set things up in this case. |
Thanks, adding |
@karthiknadig @int19h are the compiled extensions currently being distributed by default? If they're not we should probably check that so that native thread tracing works out of the box on 3.6 onwards. |
It depends on the scenario. When debugpy is published to PyPI, we upload wheels for all supported Python versions. But the version that's bundled with vscode-python only has binaries for Python 3.8 (for all supported platforms). The main reason why it doesn't include them all is because those binaries are fairly large - as it stands, debugger is already almost as big as the rest of the extension already. So if we included binaries for all supported version/platform combos, it would make the extension several times bigger. A better way to solve this would be downloading the debugger on demand. |
On PyDev I end up distributing only for Windows (I took a look and for If that doesn't work out, I like the idea of the downloading it for the user on demand though (having the user compile it locally isn't ideal on the cases where the user doesn't have the compiler toolchain setup). |
Environment data
import debugpy; print(debugpy.__version__)
if uncertain)Actual behavior
Breakpoints are not getting hit when reached from a child thread.
This seems to be a regression after version 1.1.0 (shipped with VSCode Python 2020.11.358366026). Updating the Python extension to any version after 2020.11.358366026 (which seem to ship 1.2.0 onwards) breaks this.
Rolling back to 2020.11.358366026 (with 1.1.0) and the debugging works again.
I have tried adding
"subProcess": true
but it seems that it doesn't fix this bug in 1.2.0, nor is it required when using 1.1.0 to breakpoint from a child thread.Expected behavior
Breakpoints are hit in child threads the same way in 1.1.0 and 1.2.0 onwards
Steps to reproduce:
Note this uses a QThread because the issue was encountered in debugging an async core task of a GUI. I am not sure whether a Python thread would work here. To get PyQt5 do
pip install PyQt5==5.15.1
And
launch.json
print(123)
print(123)
triggerThe text was updated successfully, but these errors were encountered: