microsoft/debugpy

Debugging Non-User Defined Code Used in a Jupyter Notebook

MaFo92 opened this issue · 1 comments

Environment data

  • debugpy version: 1.8.1
  • OS: Windows 10
  • Python version: 3.10.11
  • VS Code

Actual behavior

I'm experiencing difficulties when trying to debug non-user-defined code (e.g., imported libraries or modules) in a Jupyter notebook using Visual Studio Code (VS Code). While the debugger stops at breakpoints, I am unable to inspect the variables effectively. The cursor stops at breakpoints but remains green instead of yellow, indicating that the debugging session is not fully interactive (the same problem happen even if I use a .py script instead of a jupyter notebook file).
The cursor stops at breakpoints but remains green. I am unable to acquire any information about the variables in the non-user-defined code.

Expected behavior

When the debugger stops at a breakpoint, the cursor should turn yellow, and it should be possible to inspect the variables used in the .py file

Steps to reproduce:

Here is my launch.json configuration:
{
// 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": "Debugpy",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": false
}
]
}

EDIT (Adding some pictures):

I'm adding some pictures to better show the error. I've added a breakpoint in the package source code (2nd image) and started the debugger. As you can see, the execution stops at the correct position, but the yellow cursor is not stepping into the package code and stays "outside" in my code.
1
2

This should be a dupe of #1596 which was an issue in VS code. It looks like they've submitted a fix so it should be shipping soon.