Skip to content

Debug serially in the "Debugging tests with VS Code" recipe #1634

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

Merged
merged 5 commits into from
Jan 17, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions docs/recipes/debugging-with-vscode.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,22 @@ Save this configuration after you added it.
Set breakpoints in the code **or** write `debugger;` at the point where it should stop.

Hit the green `Debug` button next to the list of configurations on the top left in the `Debug` view. Once the breakpoint is hit, you can evaluate variables and step through the code.

## Serial debugging

By default AVA runs tests concurrently. This may complicate debugging. Add a configuration with the `--serial` argument so AVA runs only one test at a time:

```json
{
"type": "node",
"request": "launch",
"name": "Run AVA test serially",
"program": "${workspaceRoot}/node_modules/ava/profile.js",
"args": [
"--serial",
"${file}"
]
}
```

*Note that, if your tests aren't properly isolated, certain test failures may not appear when running the tests serially.*