You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/recipes/debugging-with-vscode.md
+27-2Lines changed: 27 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ You can debug your tests using [Visual Studio Code](https://code.visualstudio.co
12
12
1. In the sidebar click the *Debug* handle.
13
13
1. Create a `launch.json` file.
14
14
1. Select the Node.js environment.
15
-
1. Add following to the `configurations`object:
15
+
1. Add following to the `configurations`array and save changes:
16
16
17
17
```json
18
18
{
@@ -32,14 +32,39 @@ You can debug your tests using [Visual Studio Code](https://code.visualstudio.co
32
32
]
33
33
}
34
34
```
35
-
1. Save your changes to the `launch.json` file.
36
35
37
36
## Using the debugger
38
37
39
38
Open the file(s) you want to debug. You can set breakpoints or use the `debugger` keyword.
40
39
41
40
Now, *with a test file open*, from the *Debug* menu run the *Debug AVA test file* configuration.
42
41
42
+
## Debugging precompiled tests
43
+
44
+
If you compile your test files into a different directory, and run the tests *from* that directory, the above configuration won't work.
45
+
46
+
Assuming the names of your test files are unique you could try the following configuration instead. This assumes the compile output is written to the `build` directory. Adjust as appropriate:
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:
0 commit comments