Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger getting stuck when at root of a git repo #358

Closed
4 tasks done
timotheeguerin opened this issue Apr 17, 2024 · 1 comment · Fixed by #376
Closed
4 tasks done

Debugger getting stuck when at root of a git repo #358

timotheeguerin opened this issue Apr 17, 2024 · 1 comment · Fixed by #376
Labels
p5-urgent Fix build-breaking bugs affecting most users, should be released ASAP (priority)

Comments

@timotheeguerin
Copy link

timotheeguerin commented Apr 17, 2024

Describe the bug

When debugging a test it feels like it never finishes, after digging into what could cause this I think i have traced it down to being inside a git repo but only when at the root(for example If I was to load a sub project folder of my monorepo in vscode it seemed to work fine)
Kapture 2024-04-17 at 10 14 06
To note the debugging of the test itself works fine, its just stuck after.
And after that get into a bad state that prevent any further test run(even plain test without the debugger)

Currently on 0.8.4 but this seems to have been happening since the rewrite(0.6.0)

Reproduction

  1. git clone https://github.com/timotheeguerin/vitest-debug-repro (this is just the lib1 package from the workspace sample from vitest repo but inside a git repo)
  2. cd vitest-debug-repro
  3. npm install
  4. code .
  5. Run debug test for double.test.ts> double

Output

[INFO 10:13:40 AM] [v0.8.4] Vitest extension is activated because Vitest is installed or there is a Vite/Vitest config file in the workspace.
[INFO 10:13:40 AM] [API] Running Vitest: v1.5.0 (vite.config.ts)
[INFO 10:13:40 AM] [API] Starting Vitest process with Node.js: /Users/timotheeguerin/.nvm/versions/node/v20.11.1/bin/node
[INFO 10:13:40 AM] [API] Vitest process 36375 created
[INFO 10:13:41 AM] [API] Collecting tests: test/double.test.ts
[INFO 10:13:50 AM] Running 1 file(s) with name pattern: ^\s?double$
[INFO 10:13:53 AM] [DEBUG] Starting debugging on localhost:61240
[INFO 10:13:53 AM] Running 1 file(s) with name pattern: ^\s?double$
[Worker] Debugger listening on ws://127.0.0.1:61240/a4b52b9e-eb76-4469-be08-384bc9d49c83
For help, see: https://nodejs.org/en/docs/inspector
[Worker] Debugger attached.
[INFO 10:13:53 AM] [DEBUG] Debugging started
[INFO 10:13:54 AM] Running 1 file(s) with name pattern: ^\s?double$
[Worker] Debugger listening on ws://127.0.0.1:61240/8f44f777-501f-4866-9580-462735cc2d29
For help, see: https://nodejs.org/en/docs/inspector
[INFO 10:14:00 AM] Running 1 file(s) with name pattern: ^\s?double$
[INFO 10:14:01 AM] Running 1 file(s) with name pattern: ^\s?double$

Version

0.8.4

Validations

@timotheeguerin timotheeguerin changed the title Debugger getting stuck when at roof of a git repo Debugger getting stuck when at root of a git repo Apr 17, 2024
@sheremet-va sheremet-va added p3-minor-bug An edge case that only affects very specific usage (priority) and removed pending triage labels Apr 22, 2024
@lucas-labs
Copy link

I'm experiencing the same, but the tests are not in root of the repo.
Trying to debug a test in ./tests/*.test.ts hangs. Actually, I tried moving the tests to other paths and it always hanged.

@sheremet-va sheremet-va added p5-urgent Fix build-breaking bugs affecting most users, should be released ASAP (priority) and removed p3-minor-bug An edge case that only affects very specific usage (priority) labels May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p5-urgent Fix build-breaking bugs affecting most users, should be released ASAP (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants