Python short course: Python Debug in ipython using Magic Command
In ipython, we can use the built-in magic run -d to debug. The full run command is
%run [-n -i -e -G]
[( -t [-N] | -d [-b] | -p [profile options] )]
( -m mod | filename ) [args]
For debugger, the commands are
run -d -b40 myscript # line 40 as breakpoint in myscript.py
run -d -b myotherfile.py:20 myscript # breakpoint is in the different files
Reference:
ipython docs
Comments
Post a Comment