Lessons Learned

contact@vinta.com.br

ipdb can also be used when debugging issues with environments other than your local one. ipdb.runcall helps one debug issues on method calls through and IPython shell, and it's as simple as:

>>> import ipdb
>>> import xpto_method  # the method one wants to debug
>>> ipdb.runcall(xpto_method, 'method arg')
(ipdb) ...

ipdb.runcall receives the method one wants to call as the first argument, and subsequent to that the target method arguments.

For more usage examples, check: https://iqbalnaved.wordpress.com/2013/10/17/how-to-debug-in-ipython-using-ipdb/

Did you like?
1