Cannot stop active code in jupyter notebook vscode

Curious if others have had this issue using Julia w/ Jupyter Notebooks in VSCode. Notebooks otherwise work fine, except I can never actually seem to interrupt running cells (i.e., the stop and interrupt buttons are essentially useless) and if a program stalls etc., I almost always have to restart VSCode. This can be a rather tedious and annoying problem and was wondering what solutions if any existed…

1 Like

Hmm yeah, after a bit more searching I found that this has been referenced numerous times…

Doesn’t seem to be a clear solution…might just switch to Pluto in that case…

1 Like

This is an old thread. I just started using notebooks in vscode/cursor. Same problem. For my workflow this makes jupyter notebooks almost useless.

Did pluto work any better for you?

Pluto usually can interrupt single-threaded code, but interrupting multithreaded code usually crashes the entire Pluto server for me.

Yes, Pluto can be more responsive than Jupyter notebooks in VSCode, but there’s a significant trade-off. Since Pluto runs through your browser connected to a server, you’d lose the integrated VSCode IDE experience you’re likely seeking in the first place. The improved responsiveness comes at the cost of moving away from the code editor environment entirely, which defeats the original purpose of using notebooks within VSCode. Of course since Pluto files are just .jl files, you could just edit it in VSCode and then run the server, but again, my guess is that this isn’t what you want from your workflow.

There did seem to be an attempt to get Pluto to work in VScode. But the last commit to that project was 4 years ago. So overall, a bit frustrating overall.

1 Like

I’m not really in the habit of working in notebooks—I usually like the interactivity of the REPL+file in vscode. But when I have a bunch of plots, and explanatory text, a notebook-style report exported to PDF to share with collaborators would be nice. I just haven’t found good way (other than a notebook) to include text/math, plots, and code together in a way that makes a nice report.

But with the notebook frequently getting stuck (say, in a long loop that I want to change my mind about), forcing me to restart vscode and rerun, it’s not a viable option.

1 Like

Yeah I hear that. I think Pluto will work great then. That’s basically why I use notebooks too and it has worked out well for me.

1 Like