ipdb icon indicating copy to clipboard operation
ipdb copied to clipboard

No shell.debugger_cls on WSL

Open JorgeGarciaIrazabal opened this issue 6 years ago • 1 comments

With this simple script test.py:

import ipdb

if __name__ == '__main__':
    ipdb.set_trace()
    print('1')

I am getting this error when running it from the Windows Subsystem for Linux (WSL) bash (my case Ubuntu 16.04) python test.py

Traceback (most recent call last):
  File "test.py", line 1, in <module>
    import ipdb
  File "/home/jirazabal/code/env/local/lib/python2.7/site-packages/ipdb/__init__.py", line 7, in <module>
    from ipdb.__main__ import set_trace, post_mortem, pm, run             # noqa
  File "/home/jirazabal/code/env/local/lib/python2.7/site-packages/ipdb/__main__.py", line 43, in <module>
    debugger_cls = shell.debugger_cls
AttributeError: 'TerminalInteractiveShell' object has no attribute 'debugger_cls'

python version 2.7.12

Is there any work around to fix this?

JorgeGarciaIrazabal avatar Feb 04 '19 23:02 JorgeGarciaIrazabal

With this simple script test.py:

import ipdb

if __name__ == '__main__':
    ipdb.set_trace()
    print('1')

I am getting this error when running it from the Windows Subsystem for Linux (WSL) bash (my case Ubuntu 16.04) python test.py

Traceback (most recent call last):
  File "test.py", line 1, in <module>
    import ipdb
  File "/home/jirazabal/code/env/local/lib/python2.7/site-packages/ipdb/__init__.py", line 7, in <module>
    from ipdb.__main__ import set_trace, post_mortem, pm, run             # noqa
  File "/home/jirazabal/code/env/local/lib/python2.7/site-packages/ipdb/__main__.py", line 43, in <module>
    debugger_cls = shell.debugger_cls
AttributeError: 'TerminalInteractiveShell' object has no attribute 'debugger_cls'

python version 2.7.12

Is there any work around to fix this?

Hi @JorgeGarciaIrazabal thanks for reporting this. I have a question: do you see this string/error anywhere in your terminal?

You are currently into an embedded ipython shell,
the configuration will not be loaded.

Thanks

andreagrandi avatar Mar 15 '19 15:03 andreagrandi