I found this article: Problem to run chrome debugger in VS Code
I followed the answer there and set up the following in my launch.json:
{
"name": "Launch Chrome",
"request": "launch",
"type": "pwa-chrome",
"url": "https://localhost:44444/health/status",
"webRoot": "${workspaceFolder}/public",
"runtimeExecutable": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
}
The problem is that when I just run that "Launch Chrome" option, it opens Chrome correctly but my project / server hasn't started yet. What I really need to do is when I press F5 to debug my project, I'd like the system to start iis express, load my server project and then open chrome with all the cache cleaned up.
So I tried to change this:
"launchBrowser": {
"enabled": true,
"args": "${auto-detect-url}",
"windows": {
"command": "cmd.exe",
"args": "/C start ${auto-detect-url}"
},
"osx": {
"command": "open"
},
"linux": {
"command": "xdg-open"
}
}
to this:
"launchBrowser": {
"enabled": true,
"args": "${auto-detect-url}",
"windows": {
"command": "cmd.exe",
"args": "/C start ${auto-detect-url}"
},
"osx": {
"command": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
},
"linux": {
"command": "xdg-open"
}
}
but I get the following errors in my debug console:
crbug/1173575, non-JS module files deprecated.
chromewebdata/(index)꞉6549:22:6774
crbug/1173575, non-JS module files deprecated.
chromewebdata/(index)꞉6549:22:6774
crbug/1173575, non-JS module files deprecated.
chromewebdata/(index)꞉6549:22:6774
crbug/1173575, non-JS module files deprecated.
I've also tried to update settings.json but I don't know what values to specify:
"debug.javascript.defaultRuntimeExecutable": {
"pwa-chrome": "",
"pwa-node": "node"
}