I have installed the Debugger for Chrome extension 0.2.0 in VS Code but I can't seem to get the launch.json configuration right. I am using the trivial Express App boilerplace here. I have the chrome shortcut with --remote-debugging-port=9222. Everything works fine with the native "type": node configuration. The Express boilerplate runs with node ./bin/www and is visible in chrome at http://localhost:3000 for context. I am looking for a "request": launch entry that works like the boilerplate "name": "Launch" "type": "node" configuration. That is, launches Chrome and displays the web page so I can set client breakpoints.
My launch.json entry for chrome is the following.
{
"name": "Launch localhost with sourcemaps",
"type": "chrome",
"request": "launch",
"url": "http://localhost",
"webRoot": "./bin",
"sourceMaps": true
}
I'm the developer for this extension. From the info you've given, you'll need to set "url"
to "http:localhost:3000"
and probably "webRoot"
to "./bin/www"
. Then let me know if you still have issues.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With