-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed as not planned
Labels
Description
Describe the bug
When I put a breakpoint in Intellij in test, and run it via debug button in Intellij, breakpoint doesn't get hit and execution doesn't stop on my breakpoint.
All my tests use vitest browser mode.
I'm unable to understand if I'm missing something or if it's a bug.
According to information mentioned here, it mentions such feature is supported:
https://vitest.dev/guide/debugging.html#intellij-idea
I have the following configuration inside vite.config.ts:
test: {
inspect: true,
fileParallelism: false,
browser: {
enabled: true,
provider: playwright(),
instances: [{ browser: 'chromium' }],
},
coverage: {
reporter: ['html'],
exclude: ['src/test/**', 'src/**/gen/**'],
},
setupFiles: './src/test/VitestSetup.ts',
isolate: false,
},I've noticed that, when I change inspect to inspectBrk in configuration above, and go to opened vitest chrome browser, I see execution stopped immediately. Then when I set breakpoints in browser dev tools on those same lines, breakpoint gets hit just fine.
Reproduction
- Get Intellij IDEA Ultimate: 2025.3.1
- Write any vitest test that runs with vitest browser mode.
- Put breakpoint in that test in Intellij.
- Run that test from Intellij with debug mode.
- See that breakpoint doesn't get hit.
System Info
System:
OS: Windows 10 10.0.19045
CPU: (4) x64 Intel(R) Core(TM) i5-4670 CPU @ 3.40GHz
Memory: 8.53 GB / 31.94 GB
Binaries:
Node: 24.9.0 - C:\Program Files\nodejs\node.EXE
npm: 11.6.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 143.0.7499.170
Edge: Chromium (140.0.3485.54)
Firefox: 146.0 - C:\Program Files\Mozilla Firefox\firefox.exe
Internet Explorer: 11.0.19041.5794
npmPackages:
@vitejs/plugin-vue: ^6.0.1 => 6.0.3
@vitest/browser-playwright: ^4.0.7 => 4.0.16
@vitest/coverage-v8: ^4.0.7 => 4.0.16
@vitest/ui: ^4.0.7 => 4.0.16
vite: ^7.1.7 => 7.3.0
vitest: ^4.0.7 => 4.0.16
vitest-browser-vue: ^2.0.1 => 2.0.1Used Package Manager
npm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Smrtnyk