Skip to content

VSCode python debugger does not go inside the third party library code even with justmycode set to false on 1.90 VS code #1596

@uvnikgupta

Description

@uvnikgupta

This was working fine till I got a message in my python extension that I should restart it. After that it has stopped working.

Environment data

  • debugpy version: 1.6.7
  • OS and version: Windows 10 Enterprise
  • Python version : 3.11.9 in Anaconda environment
  • Using VS Code or Visual Studio: VSCode

Actual behavior

Python code:

import yaml

with open("./config/config.yml", "r") as f:
    data = yaml.safe_load(f)

launch.json:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "File",
            "type": "debugpy",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "justMyCode": false
        }
    ]
}

debug point at data = yaml.safe_load(f)
I can ctrl+click and go inside yaml.safe_load() and set a breakpoint in that method but when debugging, the control remain in the my code and does not go inside the safe_load(). Instead I can see that there is a light green debug arrow and a light green horizonal bar in that code. Pressing next jumps to the next statement inside that code but the control goes back to my code and I have to come back to safe_load() to see where the green arrow has moved to.

Please refer the below pics:

main code
library code

Expected behavior

The control, Yellow debug point and the horizontal bar should go inside the safe_load()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions