Java Reference
In-Depth Information
Unlike the tools you looked at previously, Safari's Web Inspector doesn't use tabs to partition the various
features. Instead, it organizes everything within the window so you have easy access to all features. You
can see the Call Stack and Scope Variables are not tabs, but rather individual sections you can view at
the same time as you debug. Click the Console button, and you'll see that it adds a panel to the bottom
of the window (see Figure 4-27).
Figure 4-27
Everything is here, readily available and visible to you; so load debug_timestable2.htm in Safari and
go back to the Web Inspector window. Click the fi le selection drop-down menu and choose the HTML
fi le to display the source code of the fi le. Like the previous tools, the source code is read-only, but you
can set breakpoints.
Setting Breakpoints
Creating a breakpoint follows the same procedure in Web Inspector as the other tools: click in the gutter
on the line you want the debugger to break at. Breakpoints in Web Inspector are denoted by a blue tag
(see Figure 4-28). Create one on line 17.
Unlike Firebug and IE's Developer Tools, Web Inspector does not list the breakpoints you set in a sepa-
rate area, so remember where your breakpoints are if you use Safari and Web Inspector as your browser
and debugger of choice.
Reload the page so the debugger can break and we can walk through the features.
Web Inspector supports the debugger keyword.
Search WWH ::




Custom Search