【发布时间】:2017-09-20 00:25:49
【问题描述】:
我正在使用 Visual Studio Code 来编写我的 python 应用程序。如果我编写一个简单的同步单文件程序,检查变量和在左侧调试窗格中设置监视之类的东西就可以了。
但是,我在多个文件中有包含类的代码,并使用来自其他模块的各种回调。一些开始一个新的线程。
其中一个模块是 canopen 我可以单步执行我的代码,但是当我进入第二行时(如下)
can0 = canopen.Network()
can0.connect(channel='can0', bustype='socketcan')
然后调用堆栈从:
CALL STACK paused on breakpoint
main
<module>
到
CALL STACK paused on breakpoint
MainThread
Thread#15034.........
同时
- 变量窗格清除
-
我的手表窗口中的手表显示:
can0: not available
我如何(使用 Python 设置 VS Studio 代码)使用各种线程和各种文件中的代码检查/调试我的 Python 代码?
问候, 巴斯
【问题讨论】:
标签: python multithreading debugging visual-studio-code