DEV Community

Jessica Chappell
Jessica Chappell

Posted on

Attaching a debugger to Jest

Have you ever wished you could have the power of a debugger at your fingertips during tests? Well good news, you can! And it's fairly simple to set up if you have VSCode.

First, open the VSCode terminal and click the dropdown arrow next to the plus icon.

image

Then select "JavaScript Debug Terminal" from the list

image

Now it's as easy as adding a breakpoint or a debugger statement and running your tests with the --watch flag!

Top comments (0)