Ipython debug

Steps are:
1. Install ipython
2. Add the import in your codes:
" from IPython.core.debugger import Tracer; debug_here = Tracer()  " or "from IPython.debugger import Tracer; debug_here = Tracer() " depends your python version
3. Add several lines of "debug_here" and "print profits value" in the proper positions
4. In ipython:
run codesname.py

type "c" to continue or type "n" to go to next line


如: 点n回车,然后可以一路回车,让他一行一行的运行。

你可能感兴趣的:(Python)