Skip to content

Instantly share code, notes, and snippets.

@minademian
Created August 10, 2022 11:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save minademian/ed6eac85668c0c69370fa53fd7a72393 to your computer and use it in GitHub Desktop.
Save minademian/ed6eac85668c0c69370fa53fd7a72393 to your computer and use it in GitHub Desktop.
Setting up debugging for Angular 1x+ project in VSCode
// Add under configurations array
{
"name": "ng serve",
"type": "chrome",
"request": "launch",
"preLaunchTask": "debugproj",
"url": "http://localhost:4201/",
"webRoot": "${workspaceFolder}",
"sourceMapPathOverrides": {
"webpack:/*": "${webRoot}/*",
"/./*": "${webRoot}/*",
"/src/*": "${webRoot}/*",
"/*": "*",
"/./~/*": "${webRoot}/node_modules/*"
}
},
{
"version": "2.0.0",
"tasks": [
{
"label": "debugproj",
"type": "npm",
"script": "start:local",
"isBackground": true,
"presentation": {
"focus": true,
"panel": "dedicated"
},
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": {
"owner": "typescript",
"source": "ts",
"applyTo": "closedDocuments",
"fileLocation": [
"relative",
"${cwd}"
],
"pattern": "$tsc",
"background": {
"activeOnStart": true,
"beginsPattern": {
"regexp": "(.*?)"
},
"endsPattern": {
"regexp": "Compiled |Failed to compile."
}
}
},
"options": {
"cwd": "${workspaceFolder}/src"
},
},
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment