Python不用IDE怎么自己debug呢!

java 有 jdb
c++ 有 gdb
python 就是 pdb啊

指令:

python3 -m pdb test.py

进入debug模式后,下面是一些在pdb常用的debug指令:

  1. (break)在test.py文件的30行设置breakpoint(断点)
b test.py:30
  1. (continue)让程序一直运行到设置的断点
c
  1. (next)运行到下一行代码
n
  1. (step)进入下一行代码用到的function或class
s

祝你好运~

GitHub 加速计划 / term / terminal
94.53 K
8.17 K
下载
The new Windows Terminal and the original Windows console host, all in the same place!
最近提交(Master分支:2 个月前 )
d04381ec "HighContrast" is not a possible requested theme. So `_UpdateBackgroundForMica()` would force the settings UI to be light or dark. To fix this, we just check if we're in high contrast mode and, if so, we don't bother setting the requested theme. 8 天前
e83434ff Turns out that having the styles for the KeyChordText and ParsedCommandLineText be empty for high contrast mode caused the issue. Since we're already using theme resources for the colors, we automatically adjust properly to whatever the high contrast theme is (Thanks XAML!). Bonus points: - we didn't need the theme dictionaries anymore, so I just moved them to the ResourceDictionary directly - ParsedCommandLineTextBlockStyle isn't used. So I removed it altogether. Validated command palette with multiple high contrast themes. See PR thread for demo. Closes #17914 8 天前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐