I've been following this post about using Debugger for Chrome in VSCode: How to debug Karma tests in Visual Studio Code?.
My launch.json is this:
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome",
"url": "http://localhost:4200",
"trace": true,
"webRoot": "${workspaceFolder}/src",
"sourceMaps": true
}
]
}
And my Karma config has this:
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['ChromeDebugging'],
singleRun: true,
restartOnFileChange: true,
customLaunchers: {
ChromeDebugging: {
base: 'Chrome',
flags: ['--remote-debugging-port=4200']
}
}
When I launch from the debug panel it goes directly to localhost:4200 but it's not hitting my breakpoints. Am I missing something obvious? Thanks for any helpful tips.