Skip to content

Commit dd7c80b

Browse files
joshnussdammy001
andauthored
docs: add instructions for debugging tests via terminal (#2085)
Co-authored-by: Anjorin Damilare <damilareanjorin1@gmail.com>
1 parent a3e624b commit dd7c80b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/guide/debugging.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,21 @@ title: Debugging | Guide
44

55
# Debugging
66

7+
## Terminal
8+
9+
To debug a test file without an IDE, you can use [`ndb`](https://github.com/GoogleChromeLabs/ndb). Just add a `debugger` statement anywhere in your code, and then run `ndb`:
10+
11+
```sh
12+
# install ndb globally
13+
npm install -g ndb
14+
15+
# alternatively, with yarn
16+
yarn global add ndb
17+
18+
# run tests with debugger enabled
19+
ndb npm run test
20+
```
21+
722
## VSCode
823

924
To debug a test file in VSCode, create the following launch configuration.

0 commit comments

Comments
 (0)