Currently, ava only support debugging one file a time only:
https://github.com/avajs/ava/blob/20f86d683cb10b43d88681a1904ad2c57c0a856b/profile.js#L70-L75
When i debug some file, i have to navigate to that file before running VSCode debugger, which is inconvenient when i keep breakpoint in another file or when i want to debug all test files at once.
Here is my current VSCode debugger configuration and my expected one:
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Run AVA test",
"program": "${workspaceFolder}/node_modules/ava/profile.js",
- "args": ["${file}", "--serial"],
+ "args": ["./**/*ts", "--serial"],
+ "cwd": "${workspaceFolder}",
"skipFiles": ["<node_internals>/**/*.js"]
}
]
}
Here is the link to my current project.
| Name | Version |
|-------|---------|
| Node.js | 12.10.0 |
| win32 | 10.0.18362 |
| ava | 2.3.0 |
| npm | 6.10.3 |
Could you elaborate on what improvement you're suggesting?
@novemberborn Thanks for your quick reply. What i means is currently, i can inspect one file a time:
$ inspect node_modules/ava/profile.js ./test/file.js
Is it possible to inspect multiple files at once?
$ inspect node_modules/ava/profile.js ./test/**/*.js
Ah I see. profile.js fakes a regular worker process so that won't work with multiple files.
There's a few other approaches discussed here: https://github.com/avajs/ava/issues/1505. Setting breakpoints in multiple test files won't ever be graceful though I think. I imagine you're better off debugging tests one at a time.
(I'm closing this issue for housekeeping purposes, but let's keep the conversation going.)