diff --git a/IPython/core/debugger.py b/IPython/core/debugger.py index 3bd6401..3b5997e 100644 --- a/IPython/core/debugger.py +++ b/IPython/core/debugger.py @@ -277,7 +277,9 @@ class Pdb(OldPdb, object): line = self.cmdqueue.pop(0) else: try: - line = ptk_prompt(get_prompt_tokens=get_prompt_tokens) + line = ptk_prompt(get_prompt_tokens=get_prompt_tokens, + history=self.shell.debugger_history, + ) except EOFError: line = 'EOF' line = self.precmd(line) diff --git a/IPython/terminal/ptshell.py b/IPython/terminal/ptshell.py index b4f89d5..2829f06 100644 --- a/IPython/terminal/ptshell.py +++ b/IPython/terminal/ptshell.py @@ -100,6 +100,7 @@ class TerminalInteractiveShell(InteractiveShell): self._update_layout() pt_cli = None + debugger_history = None autoedit_syntax = Bool(False, help="auto editing of files with syntax errors.", @@ -362,6 +363,8 @@ class TerminalInteractiveShell(InteractiveShell): self.init_term_title() self.keep_running = True + self.debugger_history = InMemoryHistory() + def ask_exit(self): self.keep_running = False