Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable debugger on kernel change #2903

Merged
merged 5 commits into from
Sep 1, 2022

Conversation

karlaspuldaro
Copy link
Member

@karlaspuldaro karlaspuldaro commented Aug 23, 2022

Fixes #2902 : Changing kernels disables debugging
With this fix, changing the kernel selection to any kernel that supports debugging enables the debug button accordingly.
change-kernel-fix

What changes were proposed in this pull request?

On kernel change, the kernel was shutdown and restarted, although the debugger service and handlers were not updated for some reason.
A simpler solution was to use the changeKernel method instead of shutdown then startKernel.

Other enhancements:

  • Reset run button state after interrupting kernel
  • Better handle default kernel selection (not to assume there is a language match with the name property)

How was this pull request tested?

  • Added unit tests for default kernel selection + debugging support

Developer's Certificate of Origin 1.1

   By making a contribution to this project, I certify that:

   (a) The contribution was created in whole or in part by me and I
       have the right to submit it under the Apache License 2.0; or

   (b) The contribution is based upon previous work that, to the best
       of my knowledge, is covered under an appropriate open source
       license and I have the right under that license to submit that
       work with modifications, whether created in whole or in part
       by me, under the same open source license (unless I am
       permitted to submit under a different license), as indicated
       in the file; or

   (c) The contribution was provided directly to me by some other
       person who certified (a), (b) or (c) and I have not modified
       it.

   (d) I understand and agree that this project and the contribution
       are public and that a record of the contribution (including all
       personal information I submit with it, including my sign-off) is
       maintained indefinitely and may be redistributed consistent with
       this project or the open source license(s) involved.

@elyra-bot
Copy link

elyra-bot bot commented Aug 23, 2022

Thanks for making a pull request to Elyra!

To try out this branch on binder, follow this link: Binder

@karlaspuldaro karlaspuldaro marked this pull request as ready for review August 23, 2022 21:19
@akchinSTC akchinSTC modified the milestones: 3.12.0, 3.11.1 Aug 24, 2022
@karlaspuldaro karlaspuldaro requested a review from lresende August 26, 2022 16:25
@karlaspuldaro
Copy link
Member Author

@lresende this is ready for review :)

@akchinSTC
Copy link
Member

@karlaspuldaro - if have kernelspec debugger set to false with

 "display_name": "Python 3 - fakecopy",
 "language": "python",
 "metadata": {
  "debugger": false
 }

should i still be seeing the debugger icon and the ability to activate it?
image

@karlaspuldaro
Copy link
Member Author

@akchinSTC Thanks for checking this case, that should disable the button, we might need to update some frontend handlers still. Marking this back to WIP

@karlaspuldaro karlaspuldaro added the status:Work in Progress Development in progress. A PR tagged with this label is not review ready unless stated otherwise. label Aug 29, 2022
Copy link
Member

@marthacryan marthacryan left a comment

Choose a reason for hiding this comment

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

Code LGTM but I haven't tested locally yet

@marthacryan
Copy link
Member

marthacryan commented Aug 30, 2022

Just tried it locally and it's working as expected w/ the xeus kernels and built-in kernel.

Copy link
Member

@akchinSTC akchinSTC left a comment

Choose a reason for hiding this comment

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

ok for this to go in as is with follow up pr on the issue I mentioned

@karlaspuldaro karlaspuldaro removed the status:Work in Progress Development in progress. A PR tagged with this label is not review ready unless stated otherwise. label Sep 1, 2022
@akchinSTC akchinSTC merged commit 2b1299b into elyra-ai:main Sep 1, 2022
akchinSTC pushed a commit that referenced this pull request Sep 1, 2022
@karlaspuldaro
Copy link
Member Author

Follow up issue #2916

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Changing kernels disables debugging
3 participants