Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

Commit

Permalink
Merge pull request #324 from llgcode/source-url-mapping
Browse files Browse the repository at this point in the history
add path mapping
  • Loading branch information
roblourens committed Jan 17, 2017
2 parents 162c1ab + 1b40137 commit 8613d84
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
9 changes: 7 additions & 2 deletions README.md
Expand Up @@ -96,15 +96,20 @@ An example `launch.json` config.
"type": "chrome",
"request": "attach",
"port": 9222,
"url": "<url of the open browser tab to connect to>"
"url": "<url of the open browser tab to connect to>",
"pathMapping": {
"/": "${workspaceRoot}"
}
},
{
"name": "Attach to url with files served from ./out",
"type": "chrome",
"request": "attach",
"port": 9222,
"url": "<url of the open browser tab to connect to>",
"webRoot": "${workspaceRoot}/out"
"pathMapping": {
"/": "${workspaceRoot}"
}
}
]
}
Expand Down
18 changes: 16 additions & 2 deletions package.json
Expand Up @@ -84,14 +84,18 @@
"type": "chrome",
"request": "launch",
"url": "http://localhost:8080",
"webRoot": "${workspaceRoot}"
"pathMapping": {
"/": "${workspaceRoot}"
}
},
{
"name": "Attach to Chrome",
"type": "chrome",
"request": "attach",
"port": 9222,
"webRoot": "${workspaceRoot}"
"pathMapping": {
"/": "${workspaceRoot}"
}
}
],
"configurationAttributes": {
Expand Down Expand Up @@ -123,6 +127,11 @@
"description": "When the 'url' field is specified, this specifies the workspace absolute path to the webserver root.",
"default": "${workspaceRoot}"
},
"pathMapping": {
"type": "object",
"description": "Map url (key) to a local folder (value)",
"default": {}
},
"runtimeExecutable": {
"type": [
"string",
Expand Down Expand Up @@ -216,6 +225,11 @@
"description": "This specifies the workspace absolute path to the webserver root. Used to resolve paths like `/app.js` to files on disk.",
"default": "${workspaceRoot}"
},
"pathMapping": {
"type": "object",
"description": "Map url (key) to a local folder (value)",
"default": {}
},
"sourceMapPathOverrides": {
"type": "object",
"description": "A set of mappings for rewriting the locations of source files from what the sourcemap says, to their locations on disk. See README for details.",
Expand Down

0 comments on commit 8613d84

Please sign in to comment.