- 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
December 31, 2024 23:17
-
-
Save cmckni3/c0429eada7a16813d182e5ce10a7ace2 to your computer and use it in GitHub Desktop.
Visual Studio code debugger configuration @angular/cli
This file contains hidden or 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}" | |
} | |
] | |
} |
Thank you very much! I was searching for this exact same tutorial. You are a blessing :D
@blowysrl , thanks for taking the time to share feedback. I appreciate the note that the webRoot
for Angular projects may differ.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you very much! I was searching for this exact same tutorial. You are a blessing :D
Also for the people like me who are following various fullstack tutorial, if the folder .vscode is in a upper position of your angular project (the folder you create with "ng new nameOfTheProject") you have to edit the configuration as such: