I've been using VS Code on macOS to develop a Vue.js app, with integrated Chrome debugging. This all works fine, but I also have a separate module I’m developing in conjunction, and it’s been symlinked in with npm link. This works great, except VS Code doesn’t let me set breakpoints in my modules’s code (they appear as “unbound” breakpoints).
The solution to this is to specify runtimeArgs in launch.json:
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "vuejs: chrome",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}/src",
"breakOnLoad": true,
"runtimeArgs": ["--preserve-symlinks", "--preserve-symlinks-main"],
"sourceMapPathOverrides": {
"webpack:///src/*": "${webRoot}/*"
}
},
]
}
But this still doesn’t work.The only examples I can find online show type node, not type chrome launch configurations. I’m not sure if Chrome debugging doesn’t support this option, or if there’s something else wrong.