Fix Debug Console when attaching to IPython process
@@ -313,8 +313,10 @@ class _PyDevFrontEnd:
version = release.__version__
def __init__(self, show_banner=True):
-
# Create and initialize our IPython instance.
+ if hasattr(PyDevTerminalInteractiveShell, '_instance') and PyDevTerminalInteractiveShell._instance is not None:
+ self.ipython = PyDevTerminalInteractiveShell._instance
+ else:
self.ipython = PyDevTerminalInteractiveShell.instance()
if show_banner:
@@ -322,7 +324,6 @@ class _PyDevFrontEnd:
# help info
self.ipython.show_banner()
-
self._curr_exec_line = 0
self._curr_exec_lines = []
