Debug Jest tests from VS Code
1 min readFeb 19, 2019
Want to debug just one single test using jest?
Let me offer you one trick to add into your launch.json
debug configuration to enable debugging of the test you are currently editing in VS Code i.e. cursor is in that test.
Consider the following snippet:
After you add that to your VS Code launch.json
you can just F5
when “in” that test and voila — debugging only that file. And if you fit
that test — only that single test.
Or you might want to debug all of them at once (this might be slow):
Thanks for reading :)