-
Notifications
You must be signed in to change notification settings - Fork 67
QT5 Threads not captured in the debugger via VSCode #428
Comments
To clarify, are they using the experimental debugger? The old one never supported this at all. |
@int19h Yes, they are and if you do the repro you will see it fails to break on the breakpoint when using both debuggers. |
I tested this inside the pydevd master version (without ptvsd) and it works properly. -- note: you need to press the button for the thread to be run in the example (this is in the original report but not here). Not sure what was the last sync pydevd -> ptvsd... I see there's a pull request open: #426 (so, maybe just applying it could fix the issue). |
Updated instructions to be clearer, thanks. Will wait to see if the next version fixes the problem then. |
Actually, I took a better look and it seems that i.e.: pydevd doesn't monkey-patch qt modules by default, it requires a |
Created an issue #435, I believe that should fix this issue. |
@DonJayamanne no, the default is having it disabled if I've gotten the latest release (2018.4.0) and on Linux I can't get it to work as you're getting there, although it works if I add the code below to the start of the module:
(which is what passing So not sure why it's working on your machine... is it possible you have some local change or you're using the development version and this is already fixed there? |
Just thought I'd chime in an say that I'm seeing the same issue with using PySide2 (aka Qt for Python) with Python 3 and the latest Vs Code. Any breakpoint I set in code executed via the overwritten run method is never hit:
Even a breakpoint on the |
I also can't get breakpoint hit inside QThread run() method, 1.32.3 (2019-03-14) version of vscode, linux, pyqt5. Does anybody succeeded doing this? |
@KestutisMa import |
Thanks! ;-) probably it would be useful to add that in Python extension documentation or tutorial. |
We have an issue reported against microsoft/vscode-python#176 where the user reports that our debugger won't stop on a breakpoint within a QTThread process.
Reproduction steps
Ensure VSCode is installed/updated and the vscode-python extension is installed/updated as well.
In VSCode, ensure the latest Python extension is installed.
Create a new file called 'qt_thread_test.py' and copy/paste the following code into it:
Then,
highlightadd a breakpoint at line 16 in the qt_thread_test.py file and run the debugger by hitting F5. Once the window opens click the button to get the code to run and hit your breakpoint.Expected Behaviour
The breakpoint is hit and execution stops on the breakpoint set.
Observed Behaviour
The breakpoint is ignored and execution runs without being stopped.
The text was updated successfully, but these errors were encountered: