Skip to content

Latest commit

 

History

History
31 lines (17 loc) · 1.64 KB

HOW-TO-USE-DEBUG-SCRIPT.md

File metadata and controls

31 lines (17 loc) · 1.64 KB

The debug script will facilitate debugging, akin to binding.pry in Rails, but not quite.

Add debugger statements that act as breakpoints:

Screen Shot 2019-03-17 at 11 46 30 AM

We can then run:

yarn test:debug

Screen Shot 2019-03-17 at 11 36 28 AM

Then navigate to chrome://inspect, in your browser, and click on inspect in the target that you've added:

Screen Shot 2019-03-17 at 11 41 33 AM

Click on the Resume script execution button (or cmd + \) to jump to each breakpoint (debugger statement):

Screen Shot 2019-03-17 at 11 49 11 AM

You can then watch variables or explore via the console:

Screen Shot 2019-03-17 at 11 54 03 AM

You might also find it useful to step to the next line:

Screen Shot 2019-03-17 at 11 59 11 AM

Be sure to close this window, when you're done, so that the tests can finish running in your terminal.