Skip to content
Permalink
Browse files
Debug serially in the "Debugging tests with VS Code" recipe (#1634)
  • Loading branch information
troysandal authored and sindresorhus committed Jan 17, 2018
1 parent aaddc37 commit 4a13966449e5bb39f2d08dec254148f463f536ba
Showing 1 changed file with 19 additions and 0 deletions.
@@ -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.*

0 comments on commit 4a13966

Please sign in to comment.