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

Command palette interrupt/restart not there for a python file #7158

Closed
rchiodo opened this issue Aug 16, 2021 · 9 comments · Fixed by #7241
Closed

Command palette interrupt/restart not there for a python file #7158

rchiodo opened this issue Aug 16, 2021 · 9 comments · Fixed by #7241
Labels
bug Issue identified by VS Code Team member as probable bug interactive-window Impacts interactive window verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@rchiodo
Copy link
Contributor

rchiodo commented Aug 16, 2021

No description provided.

@rchiodo rchiodo added the bug Issue identified by VS Code Team member as probable bug label Aug 16, 2021
@joyceerhl joyceerhl added the interactive-window Impacts interactive window label Aug 16, 2021
@greazer greazer added this to the August 2021 milestone Aug 17, 2021
@rchiodo
Copy link
Contributor Author

rchiodo commented Aug 21, 2021

Was looking at this. Kinda confusing as there's more than one restart/interrupt.

jupyter.notebookeditor.restartkernel is the one for notebooks, but is also now used in the new interactive window
jupyter.restartkernel is the one we used to use for the interactive window (i think).

So the first one is probably the one to fix. The context is a little messy though.

You'd need a file that's active that has code cells but there's also an IW open that's related to the code cells. At least to be completely correct.

@joyceerhl
Copy link
Contributor

The new interactive window does not use jupyter.notebookeditor.restartkernel:

vscode-jupyter/package.json

Lines 868 to 883 in add2eb6

"interactive/toolbar": [
{
"command": "jupyter.interactive.clearAllCells",
"group": "navigation@0",
"when": "isWorkspaceTrusted"
},
{
"command": "jupyter.restartkernel",
"group": "navigation@1",
"when": "isWorkspaceTrusted"
},
{
"command": "jupyter.interruptkernel",
"group": "navigation@2",
"when": "isWorkspaceTrusted"
},

@joyceerhl
Copy link
Contributor

These context keys aren't being properly set

"when": "jupyter.haveinteractive && jupyter.ispythonorinteractiveeactive && isWorkspaceTrusted"

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Aug 21, 2021

Duplicate of #330
I have no idea why we never fixed any of them..
I think we should just review all the commands

@rchiodo
Copy link
Contributor Author

rchiodo commented Aug 30, 2021

I don't think this is fixed. Or at least it doesn't behave the way I would expect.

image

Shows up even after closing the interactive window. I suppose that's better than it not being there.

Additionally if I have two IW's open, it's not clear which one it's going to restart. Additionally the restart doesn't put out the status message.

I think you enabled the wrong command? Well maybe. The other command might have had the restart message show up. At least it used to.

@joyceerhl
Copy link
Contributor

restart doesn't put out the status message.

The restart message shows up for me, and both the jupyter.notebookeditor.restartkernel and jupyter.restartkernel commands have the same shared command handler. Is there another command I should have looked at? https://github.com/microsoft/vscode-jupyter/blob/69fda26e079236e98e8aab580f27f2e36ef3ce53/src/client/datascience/jupyter/kernels/kernelCommandListener.ts

Which version of the Jupyter extension do you have? I'm on v2021.8.2031173646.

@rchiodo
Copy link
Contributor Author

rchiodo commented Aug 30, 2021

This one:

Version: 2021.8.2031173646

No restart message shows up at all. Might be because of me not using ZMQ though. Let me check.

@rchiodo
Copy link
Contributor Author

rchiodo commented Aug 30, 2021

No even with ZMQ enabled it fails to show a restart message. Even using the toolbar.

@rchiodo rchiodo closed this as completed Aug 30, 2021
@rchiodo
Copy link
Contributor Author

rchiodo commented Aug 30, 2021

Restart message is a different issue.

joyceerhl added a commit that referenced this issue Aug 30, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug interactive-window Impacts interactive window verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants