David Piepgrass
1 min readJul 19, 2018

--

Newbies take note:

  • First use Debug|Open Configurations to generate and show a .vscode/launch.json file for your project
  • Insert the magic snippet in the "configurations": [...] array. -i means --runInBand(no parallelism). Comment out "envFile" if you have no .env file. If you use ts-jest, comment out "preLaunchTask" and "outFiles"seems to have no effect.
  • Click debug icon on the left and select “Jest tests”. Perhaps set a breakpoint and press F5 to start (Debug|Start Debugging)
  • Personally I can’t set breakpoints in my ts files (maybe ts-jest doesn’t provide source maps to the debugger in the right way?) Also, Jest doesn’t seem to produce its output until all tests have finished. Sigh.

--

--

David Piepgrass
David Piepgrass

Written by David Piepgrass

Software engineer with over 20 years of experience. Fighting for a better world and against dark epistemology.

No responses yet