Debugging

Debugging a project as large as Mozilla can be a daunting task. Fortunately, over the years, Mozilla developers have come up with not just technologies and features to help you debug code, but have devised tips and techniques that can help too. Also available are assorted tools that you can use when debugging.

Documentation topics

Debugging on top of the Mozilla platform

Debugging JavaScript code
How to debug JavaScript code, with a focus on debugging code in the Mozilla project itself.
Debugging a XULRunner application
Tips and suggestions that will help you debug your XULRunner based application.
Debugging on Boot to Gecko
Debugging Firefox OS (apps and the platform itself)
Debugging update problems
Learn how to debug update problems in Mozilla-based applications.

Debugging the Mozilla platform

Using debuggers with Mozilla

Debugging Mozilla on Windows FAQ
Questions (and answers) about debugging Mozilla on Windows.
Debugging Mozilla on Mac OS X
Questions (and answers) about debugging Mozilla on Mac OS X.
Debugging Mozilla with gdb
gdb is our primary debugger on Mac and Linux.
Debugging Mozilla with lldb
lldb is the new debugger on Mac.

Advanced debugging techniques

Debugging Mozilla with valgrind
valgrind is a memory debugger for Mac and Linux. It is slow, but good for tracking down difficult memory safety bugs.
Replay debugging Firefox with VMWare Workstation
How to setup record and replay debugging on Firefox, to help debug intermittent mochitest failures.

Debugging specific parts of the Mozilla codebase

Debugging OpenGL
If you're working on code that involves OpenGL calls, and need to debug it, you can turn on a special OpenGL debugging mode.
Debugging frame reflow and Debugging table reflow
Notes on debugging issues in Gecko's layout engine.

Miscellaneous

Debugging Safari
Some tips for debugging Safari
Debugging Chrome
Some tips for debugging Chrome
Debugging Internet Explorer
Some tips for debugging Internet Explorer

Providing useful information to the Mozilla developers

How to get a stacktrace for a bug report
Useful information you can provide about a crash.
Reporting a Performance Problem
...using the Gecko Profiler extension.
Debugging a hang on Mac OS X
Collecting "samples" to attach to a bug.
Remote debugging
Core dumps and examples of remote debugging. Useful if a developer can't reproduce your crash.
HTTP logging
How to log HTTP network traffic for debugging purposes.

Debugging tools

Tools
Assorted tools that will help you debug your code or web site.
Download a debug build
Recent automatically compiled debug builds are available. Note that these are replaced frequently by our tinderboxes. The debug builds have "-debug" at the end of their file names.
Performance and profiling
Troubleshooting performance problems.
Debugging memory leaks
Learn about tools and techniques that will help you debug memory leaks.

Document Tags and Contributors

Tags:
Contributors to this page: Sheppy, Jesse, Nickolay, ethertank, TomoakiShimizu, phenix, cpearce, jrmuizel
Last updated by: ethertank,