Skip to content

Commit 2aa0883

Browse files
nlm-profilipesilva
authored andcommitted
docs: add some informations about VS Code debugging
Add an example of VS Code launch config permitting to debug Angular CLI.
1 parent cc15444 commit 2aa0883

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

packages/angular/cli/README.md

+22
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,28 @@ It can also receive a filename to only run that test (e.g. `node ./tests/legacy-
187187
As part of the test procedure, all packages will be built and linked.
188188
You will need to re-run `npm link` to re-link the development Angular CLI environment after tests finish.
189189

190+
### Debugging with VS Code
191+
192+
In order to debug some Angular CLI behaviour using Visual Studio Code, you can run `npm run build`, and then use a launch configuration like the following:
193+
194+
```json
195+
{
196+
"type": "node",
197+
"request": "launch",
198+
"name": "ng serve",
199+
"cwd": "<path to an Angular project generated with Angular-CLI>",
200+
"program": "${workspaceFolder}/dist/@angular/cli/bin/ng",
201+
"args": [
202+
"<ng command>",
203+
...other arguments
204+
],
205+
"console": "integratedTerminal"
206+
}
207+
```
208+
209+
Then you can add breakpoints in `dist/@angular` files.
210+
211+
For more informations about Node.js debugging in VS Code, see the related [VS Code Documentation](https://code.visualstudio.com/docs/nodejs/nodejs-debugging).
190212

191213
## Documentation
192214

0 commit comments

Comments
 (0)