diff --git a/docs/recipes/debugging-with-vscode.md b/docs/recipes/debugging-with-vscode.md index 03d2f9913..01bb85204 100644 --- a/docs/recipes/debugging-with-vscode.md +++ b/docs/recipes/debugging-with-vscode.md @@ -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.*