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

Remote Debugger does not do remoteRoot=>localRoot source mappings #1240

Open
pmunin opened this issue Jan 8, 2025 · 0 comments
Open

Remote Debugger does not do remoteRoot=>localRoot source mappings #1240

pmunin opened this issue Jan 8, 2025 · 0 comments

Comments

@pmunin
Copy link

pmunin commented Jan 8, 2025

Describe the bug

Debugging by attaching to remote host does not do remotePath=>localPath transformations. inspector-brk|wait still reveals remote paths

To Reproduce

docker-compose.yml:

services:
  worker-pool:
    image: denoland/deno:2.1.4
    volumes:
      - .:/app
    working_dir: /app
    command: [
    "run"
    ,"--inspect-brk=0.0.0.0:9229"
    ,"--allow-all"
    ,"src/index.ts"    
    ]

.vscode/launch.json/configurations:

{
      "name": "Workerpool: Attach to Docker",
      "type": "node",
      "request": "attach",
      "address": "worker-pool",
      "port": 9229,
      "remoteRoot": "/app",
      "localRoot": "${workspaceFolder}",
      "trace": true,
      "sourceMapPathOverrides": {
        "/app/*/*": "${workspaceFolder}/*",
      },
      "skipFiles": [
        "<node_internals>/**",
        "**/node_modules/**",
        "**/.deno/**",
        "/app/node_modules/**",
        "core/**"
      ]
    }

deno.json:

{
  "imports": {
    "express": "npm:[email protected]"
  },
  "nodeModulesDir":"auto"
}

Start docker compose

Launch debug configuration

It stops on preset breakpoint of some virtual files with remote paths, not existing locally. Files it steps on based on original files but may contain some transformations (e.g. source map comments)

Expected behavior

Break point should trigger at my local file, exactly where I put it. All paths in debugger should be replaced by remoteRoot=>localRoot rule according to launch.json configuration

Screenshots

Setting breakpoint before debugging:

image

Breakpoint triggered:

image

remote paths in Loaded Scripts, it also ignores the skipFiles of debug configuration:

image

Versions

vscode: 1.96.2 deno: 2.1.4 extension: 3.43.2

@pmunin pmunin changed the title Remote Debugger does not do remoteRoot=>localRoot mappings Remote Debugger does not do remoteRoot=>localRoot source mappings Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant