From 72cb4db1a3bc04df5f2c0a42bfd05dc407d9d2fa Mon Sep 17 00:00:00 2001 From: IKoshelev Date: Fri, 3 Feb 2023 10:36:13 +0100 Subject: [PATCH] docs: added hint to debug via JavaScript Debug Terminal (#2653) Added description and screenshot how to debug Vitest tests with JavaScript Debug Terminal --- docs/guide/debugging.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/guide/debugging.md b/docs/guide/debugging.md index 5a19ee981..f9f5850ba 100644 --- a/docs/guide/debugging.md +++ b/docs/guide/debugging.md @@ -21,7 +21,11 @@ ndb npm run test ## VSCode -To debug a test file in VSCode, create the following launch configuration. +Quick way to debug tests in VSCode is via `JavaScript Debug Terminal`. Open a new `JavaScript Debug Terminal` and run `npm run test` or `vitest` directly. *this works with any code ran in Node, so will work with most JS testing frameworks* + +![image](https://user-images.githubusercontent.com/5594348/212169143-72bf39ce-f763-48f5-822a-0c8b2e6a8484.png) + +You can also add a dedicated launch configuration to debug a test file in VSCode: ```json { -- 2.51.2