-
Notifications
You must be signed in to change notification settings - Fork 299
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
Don't start kernel daemon for non-python kernels. #9298
Comments
I think the user in your scenario was actually using a .NET kernel from Jupyter (not .NET interactive). We should make sure to disable debug cell for non python kernels. |
The command on the dropdown is already hidden: "notebook/cell/execute": [
{
"command": "jupyter.runAndDebugCell",
"when": "notebookType == jupyter-notebook && jupyter.ispythonnotebook && notebookCellType == code && isWorkspaceTrusted && !jupyter.notebookeditor.runByLineInProgress"
}
],
|
The command itself isn't flagged with a when clause though: {
"command": "jupyter.runAndDebugCell",
"title": "%jupyter.command.jupyter.debugCell.title%",
"icon": "$(debug-alt-small)",
"category": "Jupyter"
}, |
Just experienced an issue where my workflow was affected right after choosing "Jupyter: Debug Cell". Whenever I tried to open a notebook, I got the following error:
Things I tried
To debug, I first looked up which process was holding the tmp file using ProcessExp and figured out it was a python process whose parent was a VS Code instance with the following command line args: "C:\Users<UserName>\AppData\Local\Programs\Microsoft VS Code\Code.exe" --ms-enable-electron-run-as-node --inspect-port=0 "c:\Users<UserName>\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap-fork" --type=extensionHost --skipWorkspaceStorageLock This gave me a hint that it must have been the Jupyter extension. And so I uninstalled the .NET Interactive VS Code Extension, uninstalled the Jupyter extension and then reinstall both and that fixed it. A symptom of the issue was that I could put breakpoints in my notebook cells: The full call stack is: |
@mrsharm What's the command line for the python process that was started? In your scenario only .NET should be started to create/launch a kernel. So I'm curious why there's a python process involved at all. |
I think I am able to repro this issue. Whenever the kernel is changed to .NET (C#) dotnet from .NET Interactive, I am unable to execute the cells of the notebook and the aforementioned issue shows up: The python command line args are:
I am convinced that choosing the "Jupyter: Debug Cell" automatically changed the Kernel to .NET C# and at this point, all the badness began. The fix was to simply change the selected kernel and update all the cells to now point to the ".NET Interactive" flavor of C#. |
We may be starting the interrupt daemon for non python kernels. That would be bad. I'll have to double check that. That's the python process you show in your command line args. Although not sure how it would have the file open? Maybe it's through file handle inheritance from the old kernel. |
@mrsharm can you verify we've fixed your problem? To verify:
Verify your kernel doesn't immediately die. Thanks. |
@rchiodo, just tried this out and seems like the "Jupyter: Debug Cell" option is still there, however, it doesn't break my workflow i.e. no issue with executing the cells after the selection. Thanks for the help! |
Request is to hide the "Jupyter: Debug Cell" command for .NET Nb.
Just had a user try to use it while using C# in a notebook and it completely broke their setup :(
We want to make sure users don't think they can use this debugging feature to the point where they are completely broken.
The text was updated successfully, but these errors were encountered: