-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Implemented variable inspection when the debugger has started #10025
Conversation
Thanks for making a pull request to JupyterLab! To try out this branch on binder, follow this link: |
Thanks!
Does it mean we should also consider updating the version of jupyterlab/scripts/ci_install.sh Lines 52 to 55 in ec84e6b
Or is the new |
Second option, xeus-python 0.12.2 is mostly about adding support for the inspectVariables requesr. |
xeus-python 0.12.3 is not available yet for all platforms on conda-forge, thus the failure. EDIT: except that we install xeus-python from pypi ... |
Looks like the new wheels will have to be published to PyPI, since xeus-python is installed via pip: jupyterlab/scripts/ci_install.sh Lines 52 to 55 in ec84e6b
In the meantime the PR can be tested on Binder: https://mybinder.org/v2/gh/JohanMabille/jupyterlab/inspect?urlpath=lab-dev |
@jtpio I've changed the approach here: a new signal handler is connected to the iopubMessage signal, and asked for the defined variables after an idel message whose parent message type is I'm afraid we may miss updates of variables due to widgets, but this avoids storing an internal state. |
Back to old version of xeus-python, since the upgrade makes the tests fail. We can upgrade in a dedicated PR. |
|
Super green! |
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!
@lawrence-z-arabii do you mind opening a separate issue to track this? (if none already exists) The variable inspection from this PR is not in Thanks! |
References
#9114
Code changes
This implementation is specific to the debugger package. The frontned now sends an
inspectVariables
request to the backend when the debugger has started and the code has not hit a breakpoint.This can change can be tested with
xeus-python 0.12.2
or with this branch of ipykernel.There are still some issues (thus the WIP status):
inspectVariables
when the user restars the kernelUser-facing changes
When the debugger has started, the user can now see the variables that have been defined so far in the variables panel of the debugger sidebar.
Backwards-incompatible changes
The kernel must support the
inspectVariable
request. This means upgrading to xeus-python 0.12.3 in the tests (this can be done in another PR). There is no impact on ipykernel since the debugger will be supported in the next release only, and the support forinspectVariables
has been implemented.