Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add instructions for debugging tests via terminal #2085

Merged
merged 4 commits into from
Oct 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
joshnuss marked this conversation as resolved.
Show resolved Hide resolved
joshnuss marked this conversation as resolved.
Show resolved Hide resolved

# 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