- The Layout Debugger was written by David Baron as a replacement for the viewer.exe. Due to Ehsans work it's now available in any decent (aka debug) trunk build.. The tool provides access to some advanced debugging facilities that might be usefull for the folks who diagnose and fix layout bugs. These are also the people who usually build debug builds.
- It can show:
- box dimensions of blocks without a border
- the targets of mouse events
- flashes for every paint
- how many times a frame has been reflown
- frame and view information
To start it launch firefox with the
-layoutdebug at the command line. If you are on a debug build with --enable-tests (which is the default for debug builds), you can also choose the Layout Debugger menu item from the Tools menu.
Common display options and when they are useful
- Visual debugging
- for box size errors
- Event debugging
- for problems with links not working
- Reflow Statistics
- when you have missing reflows
Paint and Invalidate Information
- Paint Dumping
1 PAINT widget=02F0FD14 id=000A0318 rect=587,0 15,343 2 PAINT widget=03083564 id=00070330 rect= 0,0 587,343Shows the painted widget (pointer) and its rectangle.
- Invalidate Dumping
49 Invalidate widget=03083564 id=00070330 rect= 0,0 587,343 sync=no 50 Invalidate widget=02F0FD14 id=000A0318 rect= 0,0 602,343 sync=noShows the widget and the region that are marked for the next painting.
- Paint + Invalidate Dumping
- Both should be used together when tracing invalidate - paint issues.
100 Invalidate widget=02F0FD14 id=000A0318 rect=587,15 15,313 sync=no 101 Invalidate widget=02F0FD14 id=000A0318 rect=587,0 15,343 sync=no 102 PAINT widget=02F0FD14 id=000A0318 rect=587,0 15,343
- Event Dumping
740 NS_LOSTFOCUS widget=02EE042C name=something id=000802E8 pos=0,0 741 NS_GOTFOCUS widget=03583E34 name=something id=00080330 pos=0,0 742 UNKNOWN: 108 widget=03583E34 name=something id=00080330 pos=0,0Shows the handled events.
- Motion Event Dumping
845 NS_MOUSE_MOVE widget=03079A4C name=something id=007D046A pos=22,69 846 NS_MOUSE_MOVE widget=03079A4C name=something id=007D046A pos=2,67Displays additional mouse motion events.
- Crossing Events Dumping
- This works only for gtk builds
Webshells and Content
- Dump Webshells
02EBC3D4 '' parent=00000000 < 035756EC '' parent=02EBC3D4 < > >
- Dump Content
tr@03696298 refcount=2< Text@036962F0 refcount=1<\n\n> td@03695298 refcount=3< Text@036952F0 refcount=2<This is column one.> > Text@036953D8 refcount=1<\n\n> td@03695468 refcount=3< Text@036954C0 refcount=2<This is column two.> > Text@03693A80 refcount=1<\n\n> ></dd>Shows the content tree - use the more convenient Firebug/Inspector.
Debug Frame construction
- Dump Frames
displayed parameters frame
corresponding content node