Skip to content

Commit e61e164

Browse files
dianjuarJohannesHoppe
authored andcommitted
docs: add debugging instructions (#22)
angular-schule/ngx-deploy-starter#22 by @dianjuar
1 parent 0dcfd95 commit e61e164

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

docs/README_contributors.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- [2. npm link](#2-npm-link)
77
- [3. Adding to an Angular project -- ng add](#3-adding-to-an-angular-project----ng-add)
88
- [4. Testing](#4-testing)
9+
- [5. Debugging](#5-debugging)
910
- [Testing the standalone CLI](#testing-the-standalone-cli)
1011
- [Publish to NPM](#publish-to-npm)
1112

@@ -148,6 +149,25 @@ cd angular-cli-ghpages/src
148149
npm test
149150
```
150151

152+
### 5. Debugging
153+
154+
To debug angular-cli-ghpages you need to:
155+
156+
1. Place `debugger` statement, where you want your deployer stops.
157+
2. Follow the steps of [npm link](#2-npm-link) described here. compile, link and install linked in a local project
158+
3. Now, on the project that you linked the deployer, run it on debug mode using:
159+
160+
- | Normal Command | Command on Debug Mode |
161+
| :--------------------------- | :------------------------------------------------------------------------------ |
162+
| `ng deploy` | `node --inspect-brk ./node_modules/@angular/cli/bin/ng deploy` |
163+
| `ng add angular-cli-ghpages` | `node --inspect-brk ./node_modules/@angular/cli/bin/ng add angular-cli-ghpages` |
164+
165+
4. Use your favorite [Inspector Client](https://nodejs.org/de/docs/guides/debugging-getting-started/#inspector-clients) to debug
166+
167+
> This is the standard procedure to debug a NodeJs project. If you need more information you can read the official Docs of NodeJs to learn more about it.
168+
>
169+
> _https://nodejs.org/de/docs/guides/debugging-getting-started/_
170+
151171
## Testing the standalone CLI
152172

153173
To quickly test the file `engine.ts` directly, the standalone mode is the best option.

0 commit comments

Comments
 (0)