Skip to content

Commit 1e1c4bf

Browse files
committed
make debugger class configurable
1 parent f3f2a60 commit 1e1c4bf

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ipykernel/ipkernel.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from .comm.comm import BaseComm
2424
from .comm.manager import CommManager
2525
from .compiler import XCachingCompiler
26+
from .debugger import Debugger, _is_debugpy_available
2627
from .eventloops import _use_appnope
2728
from .iostream import OutStream
2829
from .kernelbase import Kernel as KernelBase
@@ -71,6 +72,8 @@ class IPythonKernel(KernelBase):
7172
shell = Instance("IPython.core.interactiveshell.InteractiveShellABC", allow_none=True)
7273
shell_class = Type(ZMQInteractiveShell)
7374

75+
debugger_class = Type(Debugger)
76+
7477
use_experimental_completions = Bool(
7578
True,
7679
help="Set this flag to False to deactivate the use of experimental IPython completion APIs.",
@@ -110,11 +113,9 @@ def __init__(self, **kwargs):
110113

111114
self.executing_blocking_code_in_main_shell = False
112115

113-
from .debugger import Debugger, _is_debugpy_available
114-
115116
# Initialize the Debugger
116117
if _is_debugpy_available:
117-
self.debugger = Debugger(
118+
self.debugger = self.debugger_class(
118119
self.log,
119120
self.debugpy_socket,
120121
self._publish_debug_event,

0 commit comments

Comments
 (0)