vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Debug Cell option disappears

Open wcneill opened this issue 3 years ago • 76 comments

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: image

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.

image

Steps to reproduce:

  1. Start a notebook
  2. Debug a cell
  3. The down arrow disappears.

Logs

Output for Jupyter in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Jupyter)

XXX

wcneill avatar May 23 '22 13:05 wcneill

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!

vscodenpa avatar May 23 '22 20:05 vscodenpa

This issue remains in 1.67.2.

MaxHellstrom avatar May 26 '22 11:05 MaxHellstrom

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

TimotheeWright avatar May 27 '22 18:05 TimotheeWright

Same, have had this issue quite a lot over the past months

RoelRotti avatar Jun 22 '22 08:06 RoelRotti

For me, the drop-down arrow reappears after scrolling further down in the notebook, and then back up to the cell.

MaxHellstrom avatar Jun 23 '22 10:06 MaxHellstrom

nb-golden because it can block debugging from working altogether. At least seems that way.

greazer avatar Jun 27 '22 20:06 greazer

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.

roblourens avatar Jun 27 '22 20:06 roblourens

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.

mariuswallraff avatar Jul 06 '22 08:07 mariuswallraff

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

roblourens avatar Jul 06 '22 18:07 roblourens

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.

roy651 avatar Jul 27 '22 14:07 roy651

Having the same issue on version 1.70.2.

smericks avatar Aug 26 '22 18:08 smericks

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

carschno avatar Nov 03 '22 09:11 carschno

Same issue, latest VSCode on Win10

Karlheinzniebuhr avatar Dec 19 '22 21:12 Karlheinzniebuhr

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.

  1. Try restarting the notebook doesn't work.
  2. Restarting vscode could solve the problem

himra13 avatar Dec 20 '22 04:12 himra13

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

roblourens avatar Dec 29 '22 18:12 roblourens

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

kodecreer avatar Dec 30 '22 02:12 kodecreer

I am having exactly the same issue on Mac M1 Max

Jonatthu avatar Jan 04 '23 23:01 Jonatthu

Same issue on Windows 11 with VSCode 1.74.3 Restart Visual Studio Code resolves temporarily.

IgorReidler avatar Jan 22 '23 09:01 IgorReidler

Exact same issue on Macbook Air M1 (2020)

notgwilym avatar Jan 27 '23 02:01 notgwilym

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.

jtsilverio avatar Feb 02 '23 13:02 jtsilverio

same issue with windows

makovez avatar Feb 10 '23 15:02 makovez

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.

nicosquare avatar Mar 05 '23 08:03 nicosquare

Still happening in Windows and MacOS. It really makes the debug feature on notebooks very tedious to use.

lalvarez3 avatar Apr 04 '23 10:04 lalvarez3

Still happening on Ubuntu too, makes using VScode very frustrating...

Thomasjurriaans avatar Apr 05 '23 08:04 Thomasjurriaans

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).

sunovivid avatar Apr 16 '23 18:04 sunovivid

Same issue on Windows 10, this has been an issue for months btw

Karlheinzniebuhr avatar Apr 21 '23 20:04 Karlheinzniebuhr

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 cli.main() File "/path/to/.vscode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 430, in main run() File "/path/to/.vscode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 284, in run_file runpy.run_path(target, run_name="main") File "/path/to/.vscode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 321, in run_path return _run_module_code(code, init_globals, run_name, File "/path/to/.vscode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 135, in _run_module_code _run_code(code, mod_globals, init_globals, File "/path/to/.vscode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 124, in _run_code exec(code, run_globals) File "/path/to/RepoName/path/to/notebook.ipynb", line 245, in "execution_count": null, NameError: name 'null' is not defined (.venv) MyPC % cd /path/to/RepoName ; /path/to/RepoName/.venv/bin/python /path/to/.v scode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher 55592 -- /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 cli.main() File "/path/to/.vscode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 430, in main run() File "/path/to/.vscode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 284, in run_file runpy.run_path(target, run_name="main") File "/path/to/.vscode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 321, in run_path return _run_module_code(code, init_globals, run_name, File "/path/to/.vscode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 135, in _run_module_code _run_code(code, mod_globals, init_globals, File "/path/to/.vscode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 124, in _run_code exec(code, run_globals) File "/path/to/RepoName/path/to/notebook.ipynb", line 245, in "execution_count": null, NameError: name 'null' is not defined (.venv) MyPC RepoName % cd /path/to/RepoName ; /usr/bin/env /path/to/RepoName/.venv/bin/python /path/to/.v scode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher 55602 -- /path/to/RepoName/path/to/notebook.ipynb `

fzouari avatar May 23 '23 10:05 fzouari

Same issue on OS 13.x

dorienh avatar Jun 19 '23 08:06 dorienh

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). image

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.

Haagimus avatar Jul 12 '23 16:07 Haagimus