When running a Jupyter Notebook in Visual studio code I used to be able to halt execution by just including a cell that triggered a syntax error. For instance, including a code cell with the text "stop here" (or any text not corresponding to variable names) would halt execution. With the latest release of both VCS and the VCS Insider version, this no longer happens. It just reports the error and continues. How can I get the original behaviour back?
Asked
Active
Viewed 120 times
1 Answers
0
There are a number of options. You can try using raise SystemExit(0)
to force execution to stop—see 'How do I terminate a script'
Alternatively, Jupyter-Lab (and Google Colab) has the option to run selected text only. If you're willing to move IDE then that might work better with your workflow.

bc1155
- 263
- 7