Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ipython debugger: full traceback on interactive pdb?
- In [1]: pdb
- Automatic pdb calling has been turned ON
- In [2]: 1/0
- > <ipython-input-2-05c9758a9c21>(1)<module>()
- -1 1/0
- ipdb> q
- ---------------------------------------------------------------------------
- ZeroDivisionError Traceback (most recent call last)
- /Users/adam/<ipython-input-2-05c9758a9c21> in <module>()
- ----> 1 1/0
- ZeroDivisionError: integer division or modulo by zero
- import sys
- def exc_hook(type, value, traceback):
- print type
- sys.excepthook = exc_hook
- $ ipython [options] files
- --xmode=<modename>
- [ 19:55 jon@hozbox ~/SO/python ]$ ipython --xmode=Plain ipython-debugger-full-traceback-on-interactive-pdb.py
- ------------------------------------------------------------
- Traceback (most recent call last):
- File "ipython-debugger-full-traceback-on-interactive-pdb.py", line 2, in <module>
- 1 / 0
- ZeroDivisionError: integer division or modulo by zero
- [ 19:55 jon@hozbox ~/SO/python ]$ ipython --xmode=Context ipython-debugger-full-traceback-on-interactive-pdb.py
- ---------------------------------------------------------------------------
- ZeroDivisionError Traceback (most recent call last)
- /home/jon/SO/python/ipython-debugger-full-traceback-on-interactive-pdb.py in <module>()
- 1
- ----> 2 #!/usr/bin/python
- 3 1 / 0
- 4
- 5
- ZeroDivisionError: integer division or modulo by zero
- [ 19:54 jon@hozbox ~/SO/python ]$ ipython --xmode=Verbose ipython-debugger-full-traceback-on-interactive-pdb.py
- ---------------------------------------------------------------------------
- ZeroDivisionError Traceback (most recent call last)
- /home/jon/SO/python/ipython-debugger-full-traceback-on-interactive-pdb.py in <module>()
- 1
- ----> 2 #!/usr/bin/python
- 3 1 / 0
- 4
- 5
- ZeroDivisionError: integer division or modulo by zero
- [ 19:55 jon@hozbox ~/SO/python ]$ ipython --xmode=Plain
- In [1]: 1 / 0
- ------------------------------------------------------------
- Traceback (most recent call last):
- File "<ipython console>", line 1, in <module>
- ZeroDivisionError: integer division or modulo by zero
- [ 20:03 jon@hozbox ~/SO/python ]$ ipython --xmode=Context
- In [1]: 1 / 0
- ---------------------------------------------------------------------------
- ZeroDivisionError Traceback (most recent call last)
- /home/jon/SO/python/<ipython console> in <module>()
- ZeroDivisionError: integer division or modulo by zero
- [ 20:01 jon@hozbox ~/SO/python ]$ ipython --xmode=Verbose
- In [1]: 1 / 0
- ---------------------------------------------------------------------------
- ZeroDivisionError Traceback (most recent call last)
- /home/jon/SO/python/<ipython console> in <module>()
- ZeroDivisionError: integer division or modulo by zero
Add Comment
Please, Sign In to add comment