The module pdb defines an interactive source code debugger for Python programs. It supports setting (conditional) breakpoints and single stepping at the source line level, inspection of stack frames, source code listing, and evaluation of arbitrary Python code in the context of any stack frame. It also supports post-mortem debugging and can be called under program control.
The typical usage to break into the debugger from a running program is to insert
import pdb; pdb.set_trace()
at the location you want to break into the debugger. You can then step through the code following this statement, and continue running without the debugger using the continue command.
我相信你在找the Python Debugger (pdb):
我建议你从^{} 开始:
一定要看一下the other ways to enter the Debugger和Debugger Commands部分。你知道吗
相关问题 更多 >
编程相关推荐