diff --git a/python/helpers/jupyter_debug/pydev_jupyter_utils.py b/python/helpers/jupyter_debug/pydev_jupyter_utils.py index 931691e97554..68e237aaa7bb 100644 --- a/python/helpers/jupyter_debug/pydev_jupyter_utils.py +++ b/python/helpers/jupyter_debug/pydev_jupyter_utils.py @@ -105,14 +105,9 @@ def enable_tracing(): def disable_tracing(): ipython_shell = get_ipython() if hasattr(ipython_shell, "debugger"): - ipython_shell.debugger.disable_tracing() - kill_pydev_threads(ipython_shell.debugger) - - -def kill_pydev_threads(py_db): - from _pydevd_bundle.pydevd_kill_all_pydevd_threads import kill_all_pydev_threads - py_db.finish_debugging_session() - kill_all_pydev_threads() + py_db = ipython_shell.debugger + py_db.disable_tracing() + py_db.dispose_and_kill_all_pydevd_threads() def is_cell_filename(filename): diff --git a/python/helpers/pydev/_pydevd_bundle/pydevd_dont_trace_files.py b/python/helpers/pydev/_pydevd_bundle/pydevd_dont_trace_files.py index 90c3c4b234bd..527d9d7da9bf 100644 --- a/python/helpers/pydev/_pydevd_bundle/pydevd_dont_trace_files.py +++ b/python/helpers/pydev/_pydevd_bundle/pydevd_dont_trace_files.py @@ -108,7 +108,6 @@ DONT_TRACE = { 'pydevd_import_class.py': PYDEV_FILE, 'pydevd_io.py': PYDEV_FILE, 'pydevd_ipython_console_output.py': PYDEV_FILE, - 'pydevd_kill_all_pydevd_threads.py': PYDEV_FILE, 'pydevd_matplotlib_image.py': PYDEV_FILE, 'pydevd_modify_bytecode.py': PYDEV_FILE, 'pydevd_numpy.py': PYDEV_FILE, diff --git a/python/helpers/pydev/_pydevd_bundle/pydevd_kill_all_pydevd_threads.py b/python/helpers/pydev/_pydevd_bundle/pydevd_kill_all_pydevd_threads.py deleted file mode 100644 index 95cbaa9d79f1..000000000000 --- a/python/helpers/pydev/_pydevd_bundle/pydevd_kill_all_pydevd_threads.py +++ /dev/null @@ -1,9 +0,0 @@ -from _pydevd_bundle.pydevd_comm import PyDBDaemonThread -from _pydevd_bundle.pydevd_constants import dict_keys - - -def kill_all_pydev_threads(): - threads = dict_keys(PyDBDaemonThread.created_pydb_daemon_threads) - for t in threads: - if hasattr(t, 'do_kill_pydev_thread'): - t.do_kill_pydev_thread()