Debug Cell option disappears
Environment data
- VS Code version: XXX
- Jupyter Extension version (available under the Extensions sidebar): v2022.4.1021342353
- Python Extension version (available under the Extensions sidebar): v2022.6.2
- OS (Windows | Mac | Linux distro) and version: Windows
- Python and/or Anaconda version: Python 3.8.8
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
- Jupyter server running: Local | Remote | N/A: Local and Remote
Expected behavior
A small drop down arrow next to the run cell, which shows a debug cell option:

Actual behavior
The drop down arrow disappears after a single debug run, and using the ctrl + shift + alt + enter to key combo to debug the cell is also unresponsive. Sometimes it comes back in a few minutes of waiting and sometimes I have to restart VS Code.

Steps to reproduce:
- Start a notebook
- Debug a cell
- The down arrow disappears.
Logs
Output for Jupyter in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Jupyter)
XXX
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.67.2. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!
This issue remains in 1.67.2.
I've been experimenting this issue the last few days. Happens every time if you stop the run during debugging but also at some other times
Same, have had this issue quite a lot over the past months
For me, the drop-down arrow reappears after scrolling further down in the notebook, and then back up to the cell.
nb-golden because it can block debugging from working altogether. At least seems that way.
I've not seen this and can't repro. It's possible that https://github.com/microsoft/vscode-jupyter/issues/10595 could help.
This comment
For me, the drop-down arrow reappears after scrolling further down in the notebook, and then back up to the cell.
point at something in vscode, but knowing how we manage context with the menu, I haven't seen an issue like this and am not sure what could cause it.
I encountered the same issue multiple times, most recently just right now, using version 1.68.1.
Scrolling up and down frantically did not resolve the issue, unfortunately.
EDIT: Maybe helpful: While Shift+Return still works for executing, Ctrl+Return stopped working at (about?) the same time as the debug drop-down disappeared, so this might be correlated.
Things that would be helpful:
- F1 > "Set log level" > Trace
- Set
"jupyter.logging.level": "verbose" - Repro the issue (even if you just do this after you are already in the broken state, it may still be helpful)
- Share the logs from the
Log (Window)andJupyteroutput channels
Having same issue on 1.68.1. Intermittent but usually happens after a debug crash. Scrolling doesn't help but running some other cell usually brings back the fantom debug option. In one worse case where it didn't reappear - only a restart of vscode worked.
Having the same issue on version 1.70.2.
I am facing the same issue on version 1.72.2 on Mac OS. However, this seems to happen only when I have opened the file in multiple tabs (in different groups). In one of them (the one I opened last in my case), the drop down arrow giving access to the debug function remains available and works.
This is not an exact analysis and hard to reproduce, but perhaps this individual report helps.
Version details:
Version: 1.72.2 (Universal) Commit: d045a5eda657f4d7b676dedbfa7aab8207f8a075 Date: 2022-10-12T22:16:30.254Z (3 wks ago) Electron: 19.0.17 Chromium: 102.0.5005.167 Node.js: 16.14.2 V8: 10.2.154.15-electron.0 OS: Darwin arm64 22.1.0 Sandboxed: No
Same issue, latest VSCode on Win10
Facing the same issue on mac os
jupyter version: v2022.11.1003412109
For me, It happens after my debugger crash and I force close the debugger.
- Try restarting the notebook doesn't work.
- Restarting vscode could solve the problem
I'll say it again
Things that would be helpful:
- F1 > "Set log level" > Trace
- Set
"jupyter.logging.level": "verbose" - Repro the issue (even if you just do this after you are already in the broken state, it may still be helpful)
- Share the logs from the
Log (Window)andJupyteroutput channels
I am having the same exact issue as above but it's on a Mac M1 on the latest OS. Same as @himra13 is saying
I am having exactly the same issue on Mac M1 Max
Same issue on Windows 11 with VSCode 1.74.3 Restart Visual Studio Code resolves temporarily.
Exact same issue on Macbook Air M1 (2020)
I'll say it again
Things that would be helpful:
* F1 > "Set log level" > Trace * Set `"jupyter.logging.level": "verbose"` * Repro the issue (even if you just do this after you are already in the broken state, it may still be helpful) * Share the logs from the `Log (Window)` and `Jupyter` output channels
Where are the logs stored? I enable the verbose logging but can't find the log files.
same issue with windows
Hi!
The issue is still happening in Ubuntu. My version is:
Version: 1.76.0 Commit: 92da9481c0904c6adfe372c12da3b7748d74bdcb Date: 2023-03-01T10:25:16.105Z Electron: 19.1.11 Chromium: 102.0.5005.196 Node.js: 16.14.2 V8: 10.2.154.26-electron.0 OS: Linux x64 5.19.0-35-generic Sandboxed: No
Thanks for any help. This issue needs to be solved and is a source of time waste.
Still happening in Windows and MacOS. It really makes the debug feature on notebooks very tedious to use.
Still happening on Ubuntu too, makes using VScode very frustrating...
Same problem.
If you are using a remote extension, it would be more convenient to press Ctrl + Shift + P to display the command palette and type "reload window".
In my case, this problem appeared when the kernel was corrupted by something (in my case, debug failure).
Same issue on Windows 10, this has been an issue for months btw
I am facing the same issue, here is a traceback of the issue:
`
UnboundLocalError Traceback (most recent call last)
(.venv) MYPC RepoName % /usr/bin/env /path/to/RepoName/.venv/bin/python /path/to/.vscode/extensions/ms-python.python-2023.8.0/
pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher 55558 -- /path/to/RepoName/path/to/notebook.ipynb
Traceback (most recent call last):
File "/usr/local/Cellar/[email protected]/3.10.9/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/Cellar/[email protected]/3.10.9/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/path/to/.vscode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/main.py", line 39, in
Same issue on OS 13.x
I am also experiencing this issue on a Win10 enterprise system: VSCode: 1.80.0
For those affected a surefire way to fix this is to reload the window using the Developer: Reload Window option from the command prompt (ctrl+shift+p, or bind it to a hotkey).
This will reset your entire environment so you will have to rerun any previous cells for processed data again but, this works for me 100% of the time.
Related(?) on Stack Overflow: VS Code Debug Cell disappears arbitrarily in Jupyter Notebook view