Skip to content

Commit 4a13966

Browse files
troysandalsindresorhus
authored andcommittedJan 17, 2018
Debug serially in the "Debugging tests with VS Code" recipe (#1634)
1 parent aaddc37 commit 4a13966

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
 

‎docs/recipes/debugging-with-vscode.md

+19
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,22 @@ Save this configuration after you added it.
3333
Set breakpoints in the code **or** write `debugger;` at the point where it should stop.
3434

3535
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.
36+
37+
## Serial debugging
38+
39+
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:
40+
41+
```json
42+
{
43+
"type": "node",
44+
"request": "launch",
45+
"name": "Run AVA test serially",
46+
"program": "${workspaceRoot}/node_modules/ava/profile.js",
47+
"args": [
48+
"--serial",
49+
"${file}"
50+
]
51+
}
52+
```
53+
54+
*Note that, if your tests aren't properly isolated, certain test failures may not appear when running the tests serially.*

0 commit comments

Comments
 (0)
Please sign in to comment.