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.
On Sat, Oct 20, 2012 at 10:00 AM, Brian Stephanik <xoedusk(a)gmail.com> wrote:
New to debuggers in general.
I'd like have PuDB executed while I'm working from within the Python
interactive prompt. Won a module in Python while in the interactive prompt.
I tried adding the following line to my Python script:
However, when I call the function from the interactive prompt that contains
this code, PuDB does not run.
Is there a way to do this?
Pudb mailing list