Skip to content

Commit 4cb0041

Browse files
committed
Handle all possible excpetions when trying to import thr debugger
1 parent cce9b7d commit 4cb0041

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ipykernel/debugger.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@
3030
_is_debugpy_available = True
3131
except ImportError:
3232
_is_debugpy_available = False
33+
except Exception as e:
34+
from pydevd import _pydev_bundle
35+
from _pydev_bundle._pydev_saved_modules import DebuggerInitializationError
36+
if isinstance(e, DebuggerInitializationError):
37+
_is_debugpy_available = False
38+
else:
39+
raise e
40+
3341

3442
# Required for backwards compatiblity
3543
ROUTING_ID = getattr(zmq, "ROUTING_ID", None) or zmq.IDENTITY

0 commit comments

Comments
 (0)