How do I stop a cell that’s running in VS Code? The Stop button does nothing at all, nor does Ctrl+C. Since I took this screenshot, the cell chugged along for another 10 minutes until I finally gave up and had to restart VS Code.
Do you have the Julia extension installed? If not you should.
If it is the case, if you have a running cell for too long, the best way is to stop the notebook in the workspace like here, by pressing the red rectangle:
EDIT: there is a similar topic here: Can't restart kernel in VSCode jupyter notebook
This doesn’t kill the running cell, in the sense that I still see a timer in the code block running. The workspace is wiped out as it should, but I can’t go beyond the code block where I stopped.
I have the same question.
Hi photor, if you can, can you also post your issue on microsoft/vscode-jupyter? Having more voices would speed up solving the problem.
I am also having the same problem.
Same here, I can’t interrupt running cells in any way except restarting VSCode. I tried setting up a WSL environment to run Julia because as far as I know interrupting cells only works in Linux with Pluto.jl. But that didn’t help at all…
Currently the vscode-jupyter workflow is unusable for me because frequently having to restart VSCode is too bothersome. Really hoping that this will be solved someday.
You don’t need to restart vscode. Only restarting the julia kernel is needed. But it’s definitely more convenient to be able to simply stop a running cell.
If I kill a cell or the workspace, the cell still thinks its executing… and runs like that forever. I have to restart vscode entirely.
Hi! Have this issue been resolved? Same problem for me. Changing / restarting the kernel doesn’t work either.
In OP’s example there is a large heatmap that takes time to display and AFAIK it is not possible to CTRL+C it, unlike higher level code, such as loops, etc.
What can be done in such cases is to kill Julia with Alt+J Alt+K
, see Julia-VS Code keybindings. And then restart Julia again.
This is equivalent to pressing the Kill Terminal trash bin icon:
Killing is not the same as stopping …
Indeed, but the point was that killing might be the only way to stop low-level functions like OP’s heatmap.
Same problem, its very problematic and its quite baffling that it has not been resolved yet tbh.
Has this problem still not been solved until today?
I have to click that stop button twice but then it does work.
Perhaps some of you could consider a different julia development workflow using directly a Julia script (.jl) rather than using a notebook. You can still run code line by line, and I think there is a sintax to define “cells” inplemented as as julia comments and run the code cell by cell if one wish…
How to do that with a .jl?
What do you mean?
If you install the VS Code julia extension then you can make a new Julia file (.jl, just a text file) and run the commands line by line.
Attached to the session you always have a julia terminal at the bottom, where you can eventually use to CTRL-C/ CTRL-D a session, and in the worst scenario (happened very very rarely to me) kill the terminal. This istantaneusly kill the Julia session, but at least you have your VSCode still there open in front of you .
I mean how to define cells in this scenario?