- Install node.js and optionally yarn
- Install and open Visual Studio Code
- Install chrome debugging extension for Visual Studio Code
- Install @angular/cli
npm i -g @angular/cli
ORyarn global add @angular/cli
- Create a new project
ng new my-project
- Open project in Visual Studio Code
- Debug > Add configuration
- Paste contents of
launch.json
into the newlaunch.json
configuration file. - Start project
ng serve
optionally changing the port with-p <value>
or--port
. Remember to change the port inlaunch.json
first since Visual Studio Code will reload and stop all programs running in the builtin terminal. - Debug > Launch Chrome against localhost
Last active
January 30, 2024 22:25
-
-
Save cmckni3/c0429eada7a16813d182e5ce10a7ace2 to your computer and use it in GitHub Desktop.
Visual Studio code debugger configuration @angular/cli
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "chrome", | |
"request": "launch", | |
"name": "Launch Chrome against localhost", | |
"url": "http://localhost:4200", | |
"webRoot": "${workspaceRoot}" | |
}, | |
{ | |
"type": "chrome", | |
"request": "attach", | |
"name": "Attach to Chrome", | |
"port": 9222, | |
"webRoot": "${workspaceRoot}" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment