Skip to content

Commit 0cffe13

Browse files
author
Kate Osborn
committed
Add command-line debug instructions
1 parent 3cd897a commit 0cffe13

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

internal/nginx/modules/README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,17 @@ npm test
4747

4848
#### Debug Unit Tests
4949

50-
If you are using IntelliJ or VSCode for development it is really simple to debug unit tests.
50+
To debug on the command-line:
51+
- Set a breakpoint using the [debugger](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) statement.
52+
- Run the tests with the inspect argument:
5153

52-
For IntelliJ:
54+
```bash
55+
mocha inspect -r esm
56+
```
57+
58+
If you are using JetBrains or VSCode for development, you can debug the unit tests in your IDE.
59+
60+
For JetBrains:
5361
- [Create a run/debug configuration for mocha](https://www.jetbrains.com/help/idea/run-debug-configuration-mocha.html).
5462
- Add `--require esm` to the `Extra Mocha Options` field in your run/debug configuration.
5563

0 commit comments

Comments
 (0)