On Sun, Oct 21, 2012 at 8:44 AM, Andreas Kloeckner
Aaron Meurer <asmeurer(a)gmail.com> writes:
I was able to get it to work using IPython, but
only in Python 3. In
IPython in Python 2, I get
Could not load source file '<ipython-input-1-19acb5473dbc>':
Traceback (most recent call last):
File "/Users/aaronmeurer/Documents/pudb/pudb/debugger.py", line
1413, in set_current_file
source_enc, _ = detect_encoding(getattr(iter(lines), _next))
File "/Users/aaronmeurer/Documents/pudb/pudb/lowlevel.py", line 143,
UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position
0: ordinal not in range(128)
and in regular Python (2 or 3), it just opens some file with just "1".
My guess is that the IPython 2 issue is a pudb bug. Making it work
in regular Python may not be doable.
And by the way, the ideal solution for interactive debugging would be
a %pudb magic for IPython, similar to %pdb, but no one ever got around
to implementing it. If we had that, then you could just enable it and
have pudb open automatically on each exception.
There is this:
Not sure how recent/working it is.
I didn't know about that. It does seem to work (the wiki has the old
ipython config file path, but if you use the new one, it works).
But what I want is to just type
and that would enable exception catching, just like %pdb.