Visual Studio code @angular/cli
{
"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}"
}
]
}
npm i -g @angular/cli
OR yarn global add @angular/cli
ng new my-project
launch.json
into the new launch.json
configuration file.ng serve
optionally changing the port with -p <value>
or --port
. Remember to change the port in launch.json
first since Visual Studio Code will reload and stop all programs running in the builtin terminal.