As the title says, recently notebooks in VSCode does not allow me to press restart kernel or interrupt (greyed out) and running the command “Julia: Restart kernel” results in the error
Command ‘Julia: Restart kernel’ resulted in an error (Running the contributed command: ‘language-julia:restartKernel’ failed.)
Tried it in jupyterlab and there it works fine, so seems to be with the VSCode plugin and not the kernel.
VSCode version 1.60.0 on fedora linux
jupyter extension version 2021.8.2041215044
julia extension version: 1.4.0
Not sure, I selected Julia 1.6.2 from a list of kernels and I can see the path to my julia executable there also. But I’m not sure how I should know whether that goes through the extension or a jupyter kernel?
Also, the problem seems to have disappeared now so I’m not sure what is going on. Maybe just some local problem with my setup, but not sure what I did that fixed it…
Thanks. Actually, I’m not sure what to use. I’d just like to use the native notebook support from VSCode with Julia. Are you saying that I don’t have to install IJulia and Jupyter as shown here if I’m using VSCode?
Jupyter extension is disabled for the workspace, is that sufficient?
The restart kernel now completely disappeared. That makes sense now, since I used the Kernel you proposed (the one annotated with Julia VS Code extension):
Given that, the native Julia notebook version (from Julia VSCode extension?) simply can’t restart the kernel currently? I think that’s fine for me, I was just confused because it seemed like a bug at first.
Is disabling the Jupyter extension and trying the native support the way to go in future?
Thanks for you help!
edit:
The notebook seems to activate automatically the current environment, pretty cool.
Very cool. Is it recommended to disable Jupyter for Julia development (even with notebooks) in VSCode? What are the disadvantages? And - is that documented? I think I’ve read a lot of docs, maybe a bit too many though.
Yes (ish), imho. The Jupyter extension isn’t strictly necessary since most of the UI has moved into VS Code core and can mess things up (e.g. output rendering might not be up to snuff etc pp).
The Notebook experience in the Julia extension is pretty new, so we don’t support everything and there probably are a bunch of bugs.
Okay, I tried the setting you mentioned and had not set that, so I was using the standard jupyter notebook environment. Testing it out now and it is looking really nice with the environments collected in the julia workspace.
Can report some buggy behavior for the julia extension kernels. It seems that multiple kernels started for my notebook somehow, and the restart and stop buttons are not responding for all but the “latest” version of the kernel. Seems like it somehow lost contact with the older kernels and started new ones, but all were still visible in the julia workspace and they were using resources in the background. They did disappear after restarting vscode.