[Feature Request] Run test in debug mode
It would be nice to have option to run the test in debug mode just like vitest
currently, I have to manually copy the test script command after clicking "Run test" via Code Lense and run it using vs code built in JavaScript Debug Terminal which works wonderfully.
The extension should add another text in the Code Lenses like "Run test debug" next to "Run test" text and this should run the test script command using vs code built in JavaScript Debug Terminal.
This should be applicable to when running the test via VS Code Test Explorer
+1 vote. Would love that option
It would be sweet if this was implemented, there's a quick workaround to do this in the meantime:
Debugging a Specific Test in Visual Studio Code
Follow these steps to debug a specific test in Visual Studio Code:
1. Add a Debug Configuration
- Open the Command Palette by pressing
Ctrl + Shift + PorCmd + Shift + P(on macOS). - Type
Debug: Add Configurationand select it. - Add the following configuration in your
launch.jsonfile:
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "test:selectedText",
"program": "${workspaceFolder}/ace.js",
"args": [
"test",
"--files",
"${relativeFile}",
"--tests",
"${selectedText}"
],
"skipFiles": [
"<node_internals>/**"
]
}
]
}
cc @OmarDST @tom-thorne @Julien-R44 in case its helpful
This is a decent work around, thanks.
would be lovely to have this built in to the extension!