vscode-jupyter: "Debug cell" not working in Jupyter notebooks when typings module is installed

Environment data

  • VS Code version: Visual Studio Code (1.76.0, undefined, desktop)
  • Jupyter Extension version (available under the Extensions sidebar): 2023.2.1200692131.
  • Python Extension version (available under the Extensions sidebar): 2023.4.1.
  • OS (Windows | Mac | Linux distro) and version: MacOS Monterey 12.5.1 (21G83)
  • Python and/or Anaconda version: 3.9.10
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): conda
  • Jupyter server running: Local

Expected behaviour

Debug cell and the debugger should be working properly on Jupyter notebooks

Actual behaviour

At first, the option is available, but when I click on it, the debugger fires up but does nothing and the debug cell button disappears.

before:

image

after clicking on debug cell:

Screenshot 2023-03-22 at 11 45 29

and I get this error too when relaunching: image

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

  1. Just open any local Jupyter notebook and try to debug any cell

Logs

jupyter_console_output.log jupyter_console_output_2.log

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Reactions: 9
  • Comments: 21 (4 by maintainers)

Most upvoted comments

I get this every time I want to debug some cell

image

And that’s it, breakpoints aren’t reached, debugger shows nothing, even the play button stops showing the little arrow at the side image

I was able to work around the issue by creating a new virtual environment.

I don’t have exactly this issue. I can’t debug as it constantly says “Ipykernel setup required for this feature” even though I’m sure that my ipykernels are installed.

(py39) C:\Users\username>jupyter kernelspec list Available kernels: python3 C:\Users\username.conda\envs\py39\share\jupyter\kernels\python3

as well as for base

(base) C:\Users\username>jupyter kernelspec list Unable to load extension: pydevd_plugins.extensions.types.pydevd_plugin_pandas_types Available kernels: python3 C:\ProgramData\Miniconda3\share\jupyter\kernels\python3

I wonder if this is connected?

The debug cell in Edge disappeared, but it works normally in Chrome

image

I’ve been able to reliably reproduce the bug in the following scenario: setup virtual environment: virtualenv venv test the debugger -> still works pip install typing test the debugger -> still works restart the kernel test the debugger -> now I get the error image

I still don’t understand the issue, but I found that the debugger works if I use conda to make a virtual environment and to install the typing package.

To emphasize, I can pip install any package, or conda install typing. The error only comes up when I “pip install typing” and I restart the kernel.

I have the same issue. I realized when i import models from super_gradients.training, “Ipykernel setup required for this feature” occurs. otherwise the debug feature works well.

Yeah, something is going on, it’s getting stuck when we start the debugger but I’m not sure why. I can tell you that the restart button will not work currently and will give you that error message though.

Hi @garrofederico, maybe it’s just that you need to add the breakpoint before starting Debug Cell? I see it in the second screenshot but not the first, so it’s not clear if it was there before you started.

If that doesn’t help, can you set the setting "jupyter.logging.level": "verbose", try again, and grab the log again? Thanks

@fschiffers please could you file a seprate issue as it looks unrelated, that way we can look at both individually. @garrofederico Sorry for not getting back, please could you try installing VS Code insiders and letting me know if this still exists in the latest pre-releaes version of jupyter extension and pre-release version of the Python extensoin

  • Please install latest VS Code Insiders
  • Open the extensions page, search for Jupyter and click the button Switch to Pre-Release Version
  • Similarly please install the latest Pre-Release version of the Python extension
Screenshot 2023-02-04 at 09 24 37