skip to Main Content

One of my main uses for a debugger is to step through parts of new libraries to better understand how they work and how to use them. But, my current install of VS Code refuses to let me set breakpoints or step through 3rd party libraries when I start debugging in Jupyter Notebook. I get a ‘Breakpoint in file excluded by filters’ error.

I’ve looked through everything I could find online about this problem, and nothing I’ve tried has worked. I have:

  • In File > Preferences > Settings > Debug turned on ‘Allow breakpoints everywhere’ for both User and Workspace
  • In … Settings > Extensions > Jupyter turned off ‘Debug Just My Code’ for both
  • In launch.json changed ‘ "justMyCode": true ‘ to ‘ "justMyCode": false ‘
  • After suggestions in How to disable "just my code" setting in VSCode debugger?, I tried to add a separate debug configuration to launch.json. This used to do the trick, but ‘ "request": "test" ‘ can no longer be used. Various alternatives I’ve tried here also do not work (e.g. "request": "attach" or "purpose": "debug-test").

The problem does not exist when I use a python file with the same code. So whatever is applying filters is only doing so when I seek to debug a cell in Jupyter Notebook.

2

Answers


  1. Chosen as BEST ANSWER

    Evidently, the problem I'm encountering is a known bug: https://github.com/microsoft/vscode-jupyter/issues/8146 . I've heard from a VS Code developer that they've (tried) to implement fixes and I should try the latest Insiders vscode build, with the latest pre-release Jupyter extension. I'm not sure I'm ready for bleeding edge, so may live with the bug until these fixes end up in a standard release.


  2. For others, the issue has been resolved, see release notes: "Just My Code" for notebook cell debugging.

    "Just My Code" for notebook cell debugging

    The "Just My Code" debug feature allows the user to determine whether
    the debugger will step through code from Python libraries, or will
    only step through user code. This has been enabled by default when
    debugging a notebook cell, and you can now set
    "jupyter.debugJustMyCode": false to disable it and allow stepping
    through library code. For the best experience, upgrade debugpy in
    your environment to >=1.6.3. Previously, this setting was only
    respected for debugging using the Interactive Window. Now it is
    respected in notebook editors as well.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search