Skip to content

How to sourceMapPathOverrides #9

@tdrz

Description

@tdrz

I am using docker to build a debug version of a wasm program, which makes the DWARF information contain file paths as used inside the docker container fs.

How can I use sourceMapPathOverrides to point to the right sources?

I have tried:

// in .vscode/launch.json
{
    "version": "0.2.0",
    "configurations": [
        "type": "node",
        "request": "launch",
        "name": "Debug Current Test File",
        "autoAttachChildProcesses": true,
        "skipFiles": ["<node_internals>/**", "**/node_modules/**"],
        "program": "${workspaceRoot}myproj/node_modules/vitest/vitest.mjs",
        "runtimeArgs": ["--preserve-symlinks"],
        "sourceMapPathOverrides": {
          "file:///workspace/*": "${workspaceFolder}/ccode/*",
        }
}

What does work is making a symlink /workspace -> ${workspaceFolder}/ccode

Basically I am looking for path substitutions like: https://developer.chrome.com/docs/devtools/wasm#map-path

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions