Open baks opened 3 years ago
In our case we have url with deployment versions:
http://localhost:8080/assets.axd/637762069256939930/node_modules/lodash/lodash.min.js
http://localhost:8080/assets.axd/637762069256939930/node_modules/vue/dist/vue.js
http://localhost:8080/assets.axd/637762069256939930/node_modules/vuex/dist/vuex.min.js
Our ideal launch.json should be:
{
"type": "pwa-chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:8080/",
"webRoot": "${workspaceFolder}",
"pathMapping": {
"assets.axd/*/node_modules/": "${workspaceFolder}/node_modules/"
}
}
I would be happy to accept a PR for this, code pointer:
I think the only change needed is at this function:
I can made the change using regexp or glob patterns. ¿which one is more appropriate?
I'm sure that on some other config file of VSCode glob or regexp file name matching is used, @connor4312 ¿ any code pointer to that?
We use micromatch elsewhere in the debugger, you should be able to reuse that 🙂
In our solution we have folder structure with versions. Without wildcard every time new version will be created we would need to change the launch.json.
Also we need to add and entry for every folder if we cannot use wildcard.
Let's look at this:
If we would be able to add wildcard in server path and in local path this would allow us to make the launch.json more concise, without adding entry for every version/folder.
Is there any workaround for this?
Thanks in advance