Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS Code cannot breakpoint 3rd party Python code in Jupyter Notebook #164178

Closed
PeterM18 opened this issue Oct 20, 2022 · 5 comments
Closed

VS Code cannot breakpoint 3rd party Python code in Jupyter Notebook #164178

PeterM18 opened this issue Oct 20, 2022 · 5 comments
Assignees
Labels
*caused-by-extension Issue identified to be caused by an extension

Comments

@PeterM18
Copy link

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 am in Jupyter Notebooks--where almost all my code is. 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 https://stackoverflow.com/questions/52980448/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").

If I extract the code from Jupyter Notebook, put it in a .py file, I have no problem stepping through the 3rd party code. So, there's a filter being applied only when I 'debug cell' in a Jupyter Notebook. But, as I've mentioned, I've set the 'Debug Just My Code' for jupyter to false in both User and Workspace. I am at a loss for what other switches I can throw or configuration files I can alter.

@roblourens
Copy link
Member

Please try in the latest Insiders vscode build, with the latest pre-release Jupyter extension, this was only just implemented microsoft/vscode-jupyter#8146

@roblourens roblourens added the *caused-by-extension Issue identified to be caused by an extension label Oct 22, 2022
@PeterM18
Copy link
Author

Thank you roblourens!

@vickkot
Copy link

vickkot commented Nov 4, 2022

@PeterM18
Hi, did you manage to get it working?
If yes, could you please tell me what vscode version you used?
Thanks

@PeterM18
Copy link
Author

PeterM18 commented Nov 4, 2022 via email

@vickkot
Copy link

vickkot commented Nov 4, 2022

@PeterM18
Thanks for the answer

@github-actions github-actions bot locked and limited conversation to collaborators Dec 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*caused-by-extension Issue identified to be caused by an extension
Projects
None yet
Development

No branches or pull requests

3 participants