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
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.
For others, the issue has been resolved, see release notes: "Just My Code" for notebook cell debugging.