microsoft / vscode-python-debugger

Python debugger (debugpy) extension for VS Code.
https://marketplace.visualstudio.com/items?itemName=ms-python.debugpy
MIT License
40 stars 17 forks source link

Subprocess stacks not loading properly #357

Closed BrunoCoimbra closed 2 weeks ago

BrunoCoimbra commented 3 weeks ago

When running an interactive debug session with debugpy, the debugger stops at subprocess breakpoints, but the current line is highlighted green instead of yellow.

Screenshot 2024-06-06 at 11 56 48 AM

Note, that there's no arrow on the breakpoint line (117), that the subprocess stack frames weren't loaded on the call stack panel, and that the variables panel is empty. If I then click on "Show 6 More Stack Frames" and select the first stack frame, the arrow appears on the current line and the variables panel is properly filled.

Screenshot 2024-06-06 at 12 01 28 PM

However, if I step over to the next line, the same problem shown on the first picture happens again.

I believe this behavior could be caused by the recent changes on the Debug Stack Focus API introduced on the latest VS Code release (version 1.90).

This is what my launch.json looks like:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Remote Attach",
            "type": "debugpy",
            "request": "attach",
            "connect": {
                "host": "localhost",
                "port": 5678
            },
            "pathMappings": [
                {
                    "localRoot": "${workspaceFolder}",
                    "remoteRoot": "/usr/lib/python3.9/site-packages/glideinwms"
                }
            ],
            "justMyCode": false,
            "subProcess": true
        }
    ]
}

Is this a bug, or am I missing some new configuration?

BrunoCoimbra commented 2 weeks ago

Issue solved with #214433.