Open wcneill opened 2 years ago
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:
"jupyter.logging.level": "verbose"
Log (Window)
and Jupyter
output channelsHaving 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.
I'll say it again
Things that would be helpful:
"jupyter.logging.level": "verbose"
Log (Window)
and Jupyter
output channelsI 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/python@3.10/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/python@3.10/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
Same issue. Develper:reaload window is not very convenient since a previous cell might have heavy data processing and I dont want to repreat again an again :(
Same issue. Develper:reaload window is not very convenient since a previous cell might have heavy data processing and I dont want to repreat again an again :(
I 100% agree with you on this one, it is not very ideal. I am only working with files in low gb size so reloading is not too inconvenient but, I totally feel your pain on that one. It is such an annoying issue.
same issue. version: 1.81.1 still not fixed
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)
andJupyter
output channels
Ok, after bumping into this error again I have found the log window.
Here is the output:
window log
---
2023-08-23 10:50:48.341 [trace] CommandService#executeCommand workbench.output.action.clearOutput
2023-08-23 10:50:48.441 [trace] CommandService#executeCommand _setContext
2023-08-23 10:50:52.621 [trace] CommandService#executeCommand jupyter.runAndDebugCell
2023-08-23 10:50:52.622 [trace] onWillActivateByEvent: onCommand:jupyter.runAndDebugCell
2023-08-23 10:50:52.633 [trace] CommandService#executeCommand _setContext
2023-08-23 10:50:52.637 [trace] CommandService#executeCommand _setContext
2023-08-23 10:50:52.642 [trace] onWillActivateByEvent: onDebugResolve
2023-08-23 10:50:52.642 [trace] onWillActivateByEvent: onDebugResolve:Python Kernel Debug Adapter
2023-08-23 10:50:52.667 [trace] MainThreadTreeViews#$registerTreeViewDataProvider pythonDebugImageWatch {"showCollapseAll":false,"canSelectMany":false,"dropMimeTypes":[],"dragMimeTypes":[],"hasHandleDrag":false,"hasHandleDrop":false,"manuallyManageCheckboxes":false}
2023-08-23 10:50:52.679 [trace] CommandService#executeCommand _setContext
2023-08-23 10:50:52.680 [trace] CommandService#executeCommand _setContext
2023-08-23 10:50:52.681 [trace] CommandService#executeCommand _setContext
2023-08-23 10:50:52.689 [trace] CommandService#executeCommand _setContext
2023-08-23 10:51:03.125 [trace] CommandService#executeCommand _setContext
2023-08-23 10:51:03.130 [trace] DialogService#prompt
2023-08-23 10:51:03.417 [trace] CommandService#executeCommand _setContext
2023-08-23 10:51:03.418 [trace] CommandService#executeCommand _setContext
2023-08-23 10:51:05.137 [trace] MainThreadTreeViews#$refresh pythonDebugImageWatch undefined
2023-08-23 10:51:16.443 [trace] CommandService#executeCommand _setContext
2023-08-23 10:51:16.443 [trace] CommandService#executeCommand _setContext
Jupyter log
---
11:32:53.762 [info] Starting debugging with mode 1
11:32:53.765 [debug] Executing silently Code (idle) = import builtins\nimport ipykernel\nbuiltins.print(ipykernel.__version__)
11:32:53.773 [debug] Executing silently Code (completed) = import builtins\nimport ipykernel\nbuiltins.print(ipykernel.__version__) with 1 output(s)
11:32:53.855 [debug] [Debug] to kernel: {"command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code - Insiders","adapterID":"Python Kernel Debug Adapter","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en","supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryReferences":true,"supportsArgsCanBeInterpretedByShell":true,"supportsMemoryEvent":true,"supportsStartDebuggingRequest":true},"type":"request","seq":1}
11:32:53.855 [debug] [Debug] to kernel, mapped: {"command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code - Insiders","adapterID":"Python Kernel Debug Adapter","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en","supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryReferences":true,"supportsArgsCanBeInterpretedByShell":true,"supportsMemoryEvent":true,"supportsStartDebuggingRequest":true},"type":"request","seq":1}
11:32:53.924 [debug] KernelProcess error: Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "~/project/venv/lib/python3.11/site-packages/debugpy/adapter/__main__.py", line 215, in <module>
__import__("debugpy")
File "~/project/venv/lib/python3.11/site-packages/debugpy/adapter/../../debugpy/__init__.py", line 35, in <module>
from debugpy.public_api import * # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/project/venv/lib/python3.11/site-packages/debugpy/adapter/../../debugpy/public_api.py", line 8, in <module>
import typing
File "~/project/venv/lib/python3.11/site-packages/debugpy/adapter/../../typing.py", line 1359, in <module>
class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):
File "~/project/venv/lib/python3.11/site-packages/debugpy/adapter/../../typing.py", line 1007, in __new__
11:32:53.925 [warn] StdErr from Kernel Process Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "~/project/venv/lib/python3.11/site-packages/debugpy/adapter/__main__.py", line 215, in <module>
__import__("debugpy")
File "~/project/venv/lib/python3.11/site-packages/debugpy/adapter/../../debugpy/__init__.py", line 35, in <module>
from debugpy.public_api import * # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/project/venv/lib/python3.11/site-packages/debugpy/adapter/../../debugpy/public_api.py", line 8, in <module>
import typing
File "~/project/venv/lib/python3.11/site-packages/debugpy/adapter/../../typing.py", line 1359, in <module>
class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):
File "~/project/venv/lib/python3.11/site-packages/debugpy/adapter/../../typing.py", line 1007, in __new__
11:32:53.925 [debug] KernelProcess error: self._abc_registry = extra._abc_registry
^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'Callable' has no attribute '_abc_registry'
11:32:53.925 [warn] StdErr from Kernel Process self._abc_registry = extra._abc_registry
^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'Callable' has no attribute '_abc_registry'
.vscode/launch.json
---
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true
}
]
}
Other info:
Other info:
I am able to debug the notebook cells if I open the .ipynb as a file. The error described above happens when I open the project folder that contains the notebook I am working with.
Deleting the project's venv and recreating it fixed the problem.
i got the same issue, and i find that switching to another virtual environment fixes my problem. However, i still don't know why, the problem still exists in the original conda environment.
I have a try: removing the module 'Typing' seems to work for the original env.
I have a try: removing the module 'Typing' seems to work for the original env.
Yeah, I had the same bug again and uninstalling the typing package also fixed it.
I don't use Typing, and still have this problem. I use conda/pip to manage environments.
Same issue here. VScode version: 1.82.3 Python version: 3.11 OS: Windows_NT x64 10
%pip uninstall typing -y
fixed it for me as well. 🤷♂️
For me the dropdown arrow is gone, after running the cell in debug mode once, but I'm still able to use ctrl + shift + alt + enter to run the cell in debug mode, which is interesting..
I had this message in jupyter-notebook
logs:
[IPKernelApp] WARNING | debugpy_stream undefined, debugging will not be enabled
Installing the python-debugpy
package fixed the issue for me.
I don't have this issue anymore with version 1.83.1 of VSCode.
same problem observed on Mac OS with VSCode version: 1.84.2 no typing is installed ( will try to update this msg with trace.
Same issue in Windows 11 VSCode 1.85.1.
Issues also still present for me in 1.85.1. If I understand correctly the notebook debug functionality is provided by the Jupyter extension https://github.com/microsoft/vscode-jupyter, because that is where the necessary debug functionality is implemented. In that repo I do not see any specific issue listed, perhaps maybe this one, which links the issue to the presence of the typings module.
Same issue in macos VSCode 1.86.2
For me as well. It does work at the start, but than after some time it stops working (presumably after some sequence of events that I am not yet aware off). Windows 10 VS code 1.84.2
Environment data
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:
Logs
Output for
Jupyter
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toJupyter
)``` XXX ```