-
-
Notifications
You must be signed in to change notification settings - Fork 43
Use the kernel spec metadata['debugger'] to check if a kernel supports debugging #457
Conversation
/** | ||
* The kernel specs manager. | ||
*/ | ||
specsManager: KernelSpec.IManager; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to make this optional, so instantiating a DebuggerService
without a kernel specs manager would always assume debugging is enabled (for example in an custom JupyterFrontEnd where only one kernel is available).
Leaving it as a draft for now as it would require changes to This is something we already discussed before. It looks like having the Also if we go for this or #456, the debugger key wouldn't be strictly needed in the |
I think it's reasonable for a kernel that supports DAP to have metadata that says it supports debugging. This seems like the fastest route to get that information and it also seems the least kernel-traffic-dependent way of doing it. I support this approach over the other PR. |
8780522
to
0aa2f36
Compare
b6c1004
to
7465dc9
Compare
It looks like we need to mock the Retrieving the specs from the local jupyter server (child process) would otherwise return a 403, as the token is generated when the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This is a much nicer way to detect debugger functionality.
👍
Is this documented anywhere? I see the |
Fixes #220.
Alternative to #456 (see this comment: #456 (comment))
The issue is that at the moment the
kernel_info_request
message is sent on theshell
channel. If the execution has stopped (breakpoint hit), the debugger frontend forever waits for thekernel_info_reply
to decide whether the kernel supports debugging or not, because thedebugger
key is in the kernel info reply.Instead of waiting for the
kernel_info_reply
, the debugger frontend now checks the kernel spec to know if a kernel supports debugging or not.This change requires the following change to the kernel spec, and the kernels (for now only xeus-python) would have to implement that change too:EDIT: this has been added to
xeus-python=0.8.0
(jupyter-xeus/xeus-python#282):Visually the result looks similar as in #456, except that there is no need for a timeout anymore:
This would also require an update to the sequence diagram in #64.