Skip to content

Commit

Permalink
docs: Add IntelliJ debug instructions (#1018)
Browse files Browse the repository at this point in the history
* docs: Add IntelliJ debug instructions

The `--threads false` part is important, because the debugger
otherweise halts all worker threads upon start.
One would have to manually let those continue, which is quite annoying.

* docs: Add IntelliJ debug instructions

Switch to slashes for cross-platform compatibility.
  • Loading branch information
kkuegler committed Mar 24, 2022
1 parent ff1a4e3 commit 329f9ca
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion docs/guide/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,16 @@ To debug a test file in VSCode, create the following launch configuration.
}
```

Then in the debug tab ensure 'Debug Current Test File' is selected, you can then open the test file you want to debug and press F5 to start debugging.
Then in the debug tab ensure 'Debug Current Test File' is selected, you can then open the test file you want to debug and press F5 to start debugging.

## IntelliJ IDEA

Create a 'Node.js' run configuration. Use the following settings to run all tests in debug mode:

Setting | Value
--- | ---
Working directory | /path/to/your-project-root
JavaScript file | ./node_modules/vitest/vitest.mjs
Application parameters | run --threads false

Then run this configuration in debug mode. The IDE will stop at JS/TS breakpoints set in the editor.

0 comments on commit 329f9ca

Please sign in to comment.