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

Invalid debug adapter when setting "justMyCode": false #552

Open
zone-coba opened this issue Jan 10, 2025 · 0 comments
Open

Invalid debug adapter when setting "justMyCode": false #552

zone-coba opened this issue Jan 10, 2025 · 0 comments
Labels
triage-needed Needs assignment to the proper sub-team

Comments

@zone-coba
Copy link

zone-coba commented Jan 10, 2025

Scenario: debugging Python application running in Docker on remote host.

Debugging own code works fine. But as soon we set "justMyCode": false, in order to debug into 3rd party libs code, we get an error:

[error] Invalid debug adapter: Error: Invalid debug adapter

Cannot debug at all, container is running and listening at port, but not accessible.

Turning back to "justMyCode": true, debugging works again, but limited to application code.

Path mappings are triple-checked.

Steps to Reproduce

  1. Open VS Code.

  2. Set up the launch.json as follows:

    {
        "configurations": [
            // Docker-specific configurations (require Python & Docker extension)
            {
                "name": "Python Debugger: LM Service (in Docker)",
                "type": "docker",
                "request": "launch",
                "preLaunchTask": "docker-run: debug",
                "python": {
                    "pathMappings": [
                        {
                            // our custom code
                            "localRoot": "${workspaceFolder}",
                            "remoteRoot": "/app" // Corresponding path in Docker container
                        },
                        {
                            // 3rd-party libraries code (relevant when "justMyCode": false)
                            "localRoot": "${workspaceFolder}/.venv/lib/python3.12/site-packages/",
                            "remoteRoot": "/app/.venv/lib/python3.12/site-packages/" // Corresponding path in Docker container
                        }
                    ],
                    "projectType": "general",
                    "justMyCode": false, // <=== fails when set to false, fine for true
                    "subProcess": true,
                    "logToFile": true  // Enable verbose logging
                }
            }
        ]
    }
  3. Start the debugger.

  4. Observe the error message: [error] Error: Invalid debug adapter at vVt.p...

Expected Behavior

The debugger should start successfully with justMyCode set to false.

Versions

vscode is 1.96.2, involved extensions

  • Python extension 2024.22.2
  • Python Debugger extension 2024.14.0
  • Docker extension 1.29.3
  • Remote extension suite

all latest versions (as of today 10 JAN 2025)

Same behavior in Py 3.11 and 3.12.

Log

2025-01-10 12:07:56.778 [error] Invalid debug adapter: Error: Invalid debug adapter
    at vVt.p (vscode-file://vscode-app/c:/Users/bell/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:748:95)
    at vVt.$acceptDAExit (vscode-file://vscode-app/c:/Users/bell/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:748:35)
    at Odt.S (vscode-file://vscode-app/c:/Users/bell/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:3144:41680)
    at Odt.Q (vscode-file://vscode-app/c:/Users/bell/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:3144:41458)
    at Odt.M (vscode-file://vscode-app/c:/Users/bell/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:3144:40546)
    at Odt.L (vscode-file://vscode-app/c:/Users/bell/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:3144:39783)
    at oee.value (vscode-file://vscode-app/c:/Users/bell/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:3144:38444)
    at x.B (vscode-file://vscode-app/c:/Users/bell/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:30:748)
    at x.fire (vscode-file://vscode-app/c:/Users/bell/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:30:967)
    at K6.fire (vscode-file://vscode-app/c:/Users/bell/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:762:10348)
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

1 participant