tuskar/docs/debugging-with-ipython.rst
Ana Krivokapic bbc5f921d3 Fix developer documentation
This patch contains a few documentation fixes:
- Add missing gcc dependency to installation instructions
- Move CONTRIBUTING.rst and INSTALL.rst to docs folder
- Replace references to stackforge with openstack
- Replace GitHub references with git.openstack.org
- Correct invalid links
- Fix typos

Change-Id: I6922b84c6b4c6b1f517802a8b83bbdbd78a52c7d
2014-01-08 15:13:30 +01:00

36 lines
821 B
ReStructuredText

======================
Debugging with iPython
======================
Requirements
------------
::
$ yum install python-ipython
$ cd tuskar
$ find . | grep no-global-site-packages.txt | xargs rm
The 'find' will allow you to import 'global' packages in Tox.
Debugging
---------
Place these two lines in the place you want to debug/drop to shell:
::
import IPython
IPython.embed()
Then start Tuskar as usual and do a GET/POST/etc. Once the code
execution hits these two lines, you will be dropped into the iPython shell
and you will have access to all local variables and the env defined in the
context of where you placed that two lines.
Tweaks
------
`ipythonrc <https://github.com/queezythegreat/settings/tree/master/ipython>`_
-> Colors on console, tab completion for methods and more ;-)