-1

Hi I am trying to debug the application in visual studio code but i am unable to debug, its showing me error message 'configured debug type'chrome' is not supported'.

Following is launch.json file code

{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [

    {
        "type": "chrome",
        "request": "attach",
        "name": "Attach to Chrome",
        "port": 4200,
        "webRoot": "${workspaceFolder}"
    }
]
}
2
  • do you have the chrome extension installed? Commented Mar 18, 2019 at 21:11
  • this is what you want to do to get it working. Commented Mar 18, 2019 at 21:13

2 Answers 2

2

Anyone who is looking for a quick fix try this:

make sure your port number in the Launch.json settings is same as the one you get after "ng serve" command. usually it is "4200" and try to include both launch and attach settings in Launch.json.

once "ng serve" is completed and angular server started listening try to click "start debugging"

then the debugger will lauch a chrome instance on 4200 and after that you can see the break point will be bound.

Do not launch it manually by typing the link(http://localhost:4200/) in browser

Sign up to request clarification or add additional context in comments.

Comments

1

You need to add this bellow "webRoot" in the existing configuration:

"sourceMapPathOverrides": {
    "/./*": "${webRoot}/*",
    "/src/*": "${webRoot}/*",
    "/*": "*",
    "/./~/*": "${webRoot}/node_modules/*",
  }

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.