How do I display thread/process Id in Python PDB?

巧了我就是萌 提交于 2019-12-05 14:21:21
(pdb) import os,threading; os.getpid(), threading.current_thread().ident

If you need to do this often, it would be convenient to add an alias in your .pdbrc file:

alias tid import os,threading;; p os.getpid(), threading.current_thread().ident
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!