HTML and CSS Reference
Figure 7-12: Selecting a different file from the Script tab.
Debugging is generally done by adding a breakpoint to your code at the spot you are interested in. Break-
points tell the browser to pause the execution of your game and hand control over to the debugger. You can add
breakpoints to a script file by clicking the gutter on the left of the file on the appropriate line. This adds a flag
to that line, and the next time that the game hits that line of code, all execution stops (see Figure 7-13 ) .
Figure 7-13: A breakpoint in the Script tab.