Skip to content

Commit 38b3361

Browse files
authored
Merge pull request #17 from kmaork/ipython_shell_workaround
fixed 'TerminalInteractiveShell' object has no attribute 'style'
2 parents e4f86ac + 0fd9170 commit 38b3361

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

madbg/debugger.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from bdb import BdbQuit
66
from contextlib import contextmanager, nullcontext
77
from IPython.terminal.debugger import TerminalPdb
8+
from IPython.terminal.interactiveshell import TerminalInteractiveShell
89
from prompt_toolkit.input.vt100 import Vt100Input
910
from prompt_toolkit.output.vt100 import Vt100_Output
1011

@@ -25,6 +26,8 @@ class RemoteIPythonDebugger(TerminalPdb):
2526
# TODO: should this be a per-thread singleton? Because sys.settrace is singletonic
2627

2728
def __init__(self, stdin, stdout, term_type):
29+
# A patch until https://github.com/ipython/ipython/issues/11745 is solved
30+
TerminalInteractiveShell.simple_prompt = False
2831
term_input = Vt100Input(stdin)
2932
term_output = Vt100_Output.from_pty(stdout, term_type)
3033
super().__init__(pt_session_options=dict(input=term_input, output=term_output), stdin=stdin, stdout=stdout)

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ install_requires =
99

1010
[metadata]
1111
name = madbg
12-
version = 1.1.3
12+
version = 1.1.4
1313
description = A fully-featured remote debugger for python
1414
author = Maor Kleinberger
1515
author_email = kmaork@gmail.com

0 commit comments

Comments
 (0)