Description
Applies To
- Notebooks (.ipynb files)
- Interactive Window and/or Cell Scripts (.py files with #%% markers)
What happened?
- Create a python file with a cell via
# %%
and add some statements and a breakpoint via the sidebar - Run "Debug cell" just to make sure everything runs as normal. Close the interactive window after this.
- Add
#!%reset -f
somewhere in the cell - Run "Debug cell"
The cell will run twice and it will hit the breakpoint both times, but try running "Debug cell" after that and it won't hit the breakpoint. Even if you restart the kernel, it doesn't hit the breakpoint. If you close the tab with the interactive window now you can run "Debug cell" again, although you get the same behavior.
The same behavior happens with #!%reset -s
(soft reset). It doesn't happen if any if in
, out
, array
, or dhist
or any combination thereof is provided, but then it doesn't quite do the reset that I'm looking for.
VS Code Version
Version: 1.101.1 (Universal) Commit: 18e3a1ec544e6907be1e944a94c496e302073435 Date: 2025-06-18T13:35:12.605Z Electron: 35.5.1 ElectronBuildId: 11727614 Chromium: 134.0.6998.205 Node.js: 22.15.1 V8: 13.4.114.21-electron.0 OS: Darwin arm64 23.5.0
Jupyter Extension Version
2025.5.0
Jupyter logs
Coding Language and Runtime Version
python 3.12.4
Language Extension Version (if applicable)
No response
Anaconda Version (if applicable)
No response
Running Jupyter locally or remotely?
Local