I'm using Visual Studio Code for writing my python application. Inspecting variables and things like setting a watch in the left debugging pane works OK if I write a simple synchronous one-file program.
However, I have code with classes in multiple files, and use various callbacks from other modules. Some which start a new thread.
One of those modules is canopen I can step thru my code, but when I enter the second line (below)
can0 = canopen.Network()
can0.connect(channel='can0', bustype='socketcan')
then the call stack changes from:
CALL STACK paused on breakpoint
main
<module>
to
CALL STACK paused on breakpoint
MainThread
Thread#15034.........
and simultaneously
- the variables pane clears
and the watches in my watch window shows:
can0: not available
How can I (setup VS studio code with Python to) inspect/debug my python code with various threads and code in various files?
Regards, Bas