Skip to content

Commit

Permalink
docs: add instructions for debugging tests via terminal (vitest-dev#2085
Browse files Browse the repository at this point in the history
)

Co-authored-by: Anjorin Damilare <damilareanjorin1@gmail.com>
  • Loading branch information
joshnuss and dammy001 committed Oct 7, 2022
1 parent a3e624b commit dd7c80b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/guide/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@ title: Debugging | Guide

# Debugging

## Terminal

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`:

```sh
# install ndb globally
npm install -g ndb

# alternatively, with yarn
yarn global add ndb

# run tests with debugger enabled
ndb npm run test
```

## VSCode

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

0 comments on commit dd7c80b

Please sign in to comment.