From 981ebad61f0447c78120038ce5d67f1157fecc8b Mon Sep 17 00:00:00 2001 From: Joshua Nussbaum Date: Mon, 26 Sep 2022 01:48:32 -0400 Subject: [PATCH 1/4] Add instructions for debugging tests via terminal --- docs/guide/debugging.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/guide/debugging.md b/docs/guide/debugging.md index 9fef01e8de30..e43182881165 100644 --- a/docs/guide/debugging.md +++ b/docs/guide/debugging.md @@ -4,6 +4,18 @@ title: Debugging | Guide # Debugging +## Terminal + +To debug a test file in you shell, add a `debugger` statement anywhere in your code, and then run `ndb`: + +```sh +# install ndb globally +npm install -g ndb + +# run tests with debugger enabled +ndb npm run test +``` + ## VSCode To debug a test file in VSCode, create the following launch configuration. From ee2baeb7d615e72bf1f26f92ea8ae40426ce3d4f Mon Sep 17 00:00:00 2001 From: Joshua Nussbaum Date: Mon, 26 Sep 2022 01:49:44 -0400 Subject: [PATCH 2/4] Update debugging.md --- docs/guide/debugging.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide/debugging.md b/docs/guide/debugging.md index e43182881165..de5741bce099 100644 --- a/docs/guide/debugging.md +++ b/docs/guide/debugging.md @@ -6,7 +6,7 @@ title: Debugging | Guide ## Terminal -To debug a test file in you shell, add a `debugger` statement anywhere in your code, and then run `ndb`: +To debug a test file in your shell, add a `debugger` statement anywhere in your code, and then run `ndb`: ```sh # install ndb globally From 026967f4b571cd5d130409753b9908545faae365 Mon Sep 17 00:00:00 2001 From: Joshua Nussbaum Date: Sat, 1 Oct 2022 21:03:38 -0400 Subject: [PATCH 3/4] Add yarn instructions Co-authored-by: Anjorin Damilare --- docs/guide/debugging.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/guide/debugging.md b/docs/guide/debugging.md index de5741bce099..18b0531551fc 100644 --- a/docs/guide/debugging.md +++ b/docs/guide/debugging.md @@ -12,6 +12,9 @@ To debug a test file in your shell, add a `debugger` statement anywhere in your # install ndb globally npm install -g ndb +# alternatively, with yarn +yarn global add ndb + # run tests with debugger enabled ndb npm run test ``` From 643441d28df131642a21674ef89ec63c8688eb8c Mon Sep 17 00:00:00 2001 From: Joshua Nussbaum Date: Sat, 1 Oct 2022 21:05:14 -0400 Subject: [PATCH 4/4] Adds link to ndb repo --- docs/guide/debugging.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide/debugging.md b/docs/guide/debugging.md index 18b0531551fc..5a19ee981884 100644 --- a/docs/guide/debugging.md +++ b/docs/guide/debugging.md @@ -6,7 +6,7 @@ title: Debugging | Guide ## Terminal -To debug a test file in your shell, add a `debugger` statement anywhere in your code, and then run `ndb`: +To debug a test file without an IDE, you can use [`ndb`](https://github.com/GoogleChromeLabs/ndb). Just add a `debugger` statement anywhere in your code, and then run `ndb`: ```sh # install ndb globally