Visual Studio Code.
Typescript files are compiled to JavaScript files with sourcemaps.
Generated launch.json:
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:8080",
"webRoot": "${workspaceRoot}"
},
{
"type": "chrome",
"request": "attach",
"name": "Attach to Chrome",
"port": 9222,
"webRoot": "${workspaceRoot}"
}
]
}
Chrome is started with parameter: --remote-debugging-port=9222
However I still get
Cannot connect to the target: connect ECONNREFUSED 127.0.0.1:9222
error in VSCode, when trying to debug with "Attach to Chrome" option.