From 1ceccda151a858f4e4367efeeef0d48218ab3747 Mon Sep 17 00:00:00 2001 From: Vidar Tonaas Fauske Date: Wed, 7 Dec 2022 10:25:00 +0000 Subject: [PATCH] Use pydevd ipython hook This enables pydevd/debugpy to use IPython specific frame filtering for stack requests etc. --- ipykernel/debugger.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ipykernel/debugger.py b/ipykernel/debugger.py index 224678232..2ba6bc7c7 100644 --- a/ipykernel/debugger.py +++ b/ipykernel/debugger.py @@ -18,6 +18,8 @@ from .compiler import get_file_name, get_tmp_directory, get_tmp_hash_seed try: + if "PYDEVD_IPYTHON_COMPATIBLE_DEBUGGING" not in os.environ: + os.environ["PYDEVD_IPYTHON_COMPATIBLE_DEBUGGING"] = "1" # This import is required to have the next ones working... from debugpy.server import api # noqa