-
Hi, I haven't quite got my head around what's going on, so I'm hoping someone here has already experienced this. I am putting debug breakpoints in It seems like it breaks if it's called from the main thread, but doesn't break if it's called from the UI thread? Has anyone come across this and more to the point: does anyone know the trick to getting it to hit those breakpoints? It's not being called from a separate I'm using visual studio code rather pycharm, but that shouldn't make any difference - it's obviously able to get to the symbols & debug through the file, it's just that the mechanism by which the UI calls through to those functions somehow bypasses the debugger... Any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
It's a problem with vscode! More info here: And copying from the Microsoft site linked there:
import debugpy
debugpy.debug_this_thread() |
Beta Was this translation helpful? Give feedback.
-
Does this allow you to debug from GUI with Vscode?
|
Beta Was this translation helpful? Give feedback.
Yeah, no problems once you do this:
import debugpy
add
debugpy.debug_this_thread()
to the top of all the functions in your device. e.g. for the scanner_probe I'm implementing it's:It is 100% reliable hitting breakpoints after this.