Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Automagically starts the debugger if the kernel supports it #126

Merged
merged 1 commit into from
Oct 30, 2019

Conversation

JohanMabille
Copy link
Member

@JohanMabille JohanMabille commented Oct 30, 2019

Fixes #117 and #110.

This removes the start and stop commands form the palette and implements the following behavior:

  • when clicking on "Debugger" in the palette, the kernel of the notebook or console that has the focus starts a debugger if it can
  • when opening a notebook or a console while the Debugger panel is already mounted, he associated kernel starts a debugger it it can.
  • a running debugger is never manually stoppable (it will be stopped when the kernel dies).

@JohanMabille JohanMabille marked this pull request as ready for review October 30, 2019 10:19
@JohanMabille
Copy link
Member Author

This is ready for review and merge. There is a workaround due to breakpoints being updated upon each cell change. THis can lead to send a debug request to a kernel that is not ready yet.

A betteer fix would be to keep the list of all the breakpoints of a Notebook, and let the restoreSession update them when we switch to another notebook.

@@ -92,11 +92,13 @@ export namespace Breakpoints {
}

set breakpoints(breakpoints: IBreakpoint[]) {
console.log('setbreakpoints called');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left over console.logs?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oups ;)

src/index.ts Show resolved Hide resolved
@jtpio
Copy link
Member

jtpio commented Oct 30, 2019

Pretty neat.

Found this while trying it out locally:

restart-kernel-switch-cell

But it's probably something that falls under #76.

@JohanMabille
Copy link
Member Author

Yes and it should be solved if we implement #130 (meaning we wouldn't have to check if the kernel is ready at all)

@jtpio
Copy link
Member

jtpio commented Oct 30, 2019

This fixes #117 and #110.

Copy link
Member

@jtpio jtpio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks 👍

It's indeed simpler to have the debugger always around and started automatically.

@jtpio jtpio merged commit d1c0d9c into jupyterlab:master Oct 30, 2019
@jtpio
Copy link
Member

jtpio commented Oct 30, 2019

The other changes in the diff are related to the linting (#116 and more will come).

@JohanMabille JohanMabille deleted the auto_start branch October 30, 2019 12:59
@jtpio jtpio mentioned this pull request Nov 4, 2019
@jtpio jtpio mentioned this pull request Nov 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Always start the debugger whenever possible?
2 participants