- In the Sources tab, open the
.js file from the Page panel in the left sidebar. Set a breakpoint by clicking on the line number.
- Perform the action necessary to trigger that line of code, which will pause the execution at the breakpoint.
- Use the toolbar on the right sidebar to step-in/step-out, watch expressions, local vars while debugging through the code.
- Alternatively, you can also add the
debugger; statement in the code to pause execution of the code at that line.