vitest-dev / vscode

VS Code extension for Vitest
https://vitest.dev/vscode
MIT License
729 stars 79 forks source link

Debugging twice fails #374

Closed ffMathy closed 2 months ago

ffMathy commented 2 months ago

Describe the bug

When I first debug a test, it works just fine. But then when I do it again, I just get a "Debugging failed". This has been existing since the new version of the extension.

Reproduction

No repro yet - but could use advice on how to repro (and where to perhaps insert more log statements?).

Output

[INFO 11:19:36 AM] [DEBUG] Starting debugging on localhost:9229
[INFO 11:19:36 AM] Running 1 file(s) with name pattern: ^\s?Class: CreateVEDTask Use case: Action is always discoverable action is available$
[Worker] Debugger listening on ws://127.0.0.1:9229/936930f0-6b4c-4f66-bf18-93973dbb8cc2
For help, see: https://nodejs.org/en/docs/inspector
[Worker] Debugger attached.
[INFO 11:19:36 AM] [DEBUG] Debugging started
[INFO 11:19:43 AM] Running 1 file(s) with name pattern: ^\s?Class: CreateVEDTask Use case: Action is always discoverable action is available$
[Worker] Debugger listening on ws://127.0.0.1:9229/411c89e3-a316-42da-a4ee-aea9299cdacb
For help, see: https://nodejs.org/en/docs/inspector
[INFO 11:20:03 AM] [DEBUG] Starting debugging on localhost:43631
[INFO 11:20:03 AM] Running 1 file(s) with name pattern: ^\s?Class: CreateVEDTask Use case: Action is always discoverable action is available$
[Error 11:20:13 AM] [DEBUG] Debugging failed

Version

0.10.0

Validations

ffMathy commented 2 months ago

Could use some help on where to insert log statements etc to help diagnose the issue on my repo, and therefore create a better reproduction.

I have no idea where to start.

sheremet-va commented 2 months ago

I am currently rewriting how debugging works (now spawns a separate Vitest instance) - let's see how stable it is.