Describe the bug
When running unit tests using Jest and the VSCode debugger (Node.js version 20.9.0), the test command is executed twice before the debugger successfully connects. This results in redundant environment setup and delays in the debugging process.
This behavior occurs even when autoAttachMode is set to "smart" and a proper launch.json configuration is used for the debugger.
To Reproduce
Steps to reproduce the behavior:
Configure the launch.json file with the following configuration for debugging Jest tests:
Ensure autoAttachMode is set to "smart" in the VSCode settings.
Run the debugger using the Debug Unit Tests configuration.
Node.js version in use: 20.9.0
Expected Behavior
The test command should execute once, and the debugger should attach immediately after the test environment is set up.
Actual Behavior
The test command is executed twice, and only after the second execution does the debugger successfully attach. The integrated terminal shows the following command running twice before attaching:
Describe the bug When running unit tests using Jest and the VSCode debugger (Node.js version 20.9.0), the test command is executed twice before the debugger successfully connects. This results in redundant environment setup and delays in the debugging process.
This behavior occurs even when autoAttachMode is set to "smart" and a proper launch.json configuration is used for the debugger.
To Reproduce Steps to reproduce the behavior:
autoAttachMode
is set to "smart" in the VSCode settings.Debug Unit Tests
configuration.Expected Behavior The test command should execute once, and the debugger should attach immediately after the test environment is set up.
Actual Behavior The test command is executed twice, and only after the second execution does the debugger successfully attach. The integrated terminal shows the following command running twice before attaching:
After the second run, the terminal prints:
Additional Information
autoAttachMode
is already set to"smart"
.launch.json
.Expected Fix The debugger should attach immediately after the first execution of the command without running the test environment twice.