Debugging tests with Vitest
I am trying to launch tests in debugger. According to vitest documentation https://vitest.dev/guide/debugging.html#node-inspector-e-g-chrome-devtools running it as
vitest --inspect-brk --no-file-parallelism
should work just fine. So I tried:
But it doesn't launch a debugger - it just runs tests as usual.
Adding --inspect-brk
to Deno itself, like:
It starts a debugger, but when I attach to it from vscode, it never stop on breakpoints inside tests.
What is a way to debug tests using Vitest in Deno?
Thank you.Vitest
Next generation testing framework powered by Vite
1 Reply
Talking to Vitest team suggests that this is a bug in Deno, so I reported it: https://github.com/denoland/deno/issues/28879
GitHub
Vitest fails to start debugger · Issue #28879 · denoland/deno
Version: Deno 2.2.9 According to the Vitest documentation, the way to debug tests with vitest is: vitest --inspect-brk --no-file-parallelism In Deno the equivalent would be: deno -A npm:vitest --in...