04.11.2015 Views

javascript

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 14: Error Handling and Debugging<br />

By default, the Scripts tab is selected. This tab contains all of the tools for JavaScript development,<br />

including the debugger. The first tab within this tab (also called Scripts) contains a list of each JavaScript<br />

source on the same page, both inline scripts and included files. Clicking on an item in this list switches<br />

you to the Source tab to see the source code (see Figure 14 - 30 ).<br />

Figure 14-30<br />

Breakpoints<br />

Breakpoints are set on the Source tab by clicking on the line number where you want to set the<br />

breakpoint. Unlike other debuggers, you can set breakpoints only on lines rather than on individual<br />

statements. Also unlike other debuggers, there is no overall list of breakpoints that you can refer back to.<br />

When a breakpoint is hit, a black arrow appears next to the line number of the breakpoint (see Figure 14-31 ).<br />

You can see the call stack on the right side of the pane, in the Call Stack tab. The Inspection tab contains<br />

information about the variables that are in scope at that point in time.<br />

Figure 14-31<br />

511

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!