<p>The Debugger is an application the common user hasn't much use for. It's targeted at developers to investigate bugs in programs. Sometimes those bugs result in crashes and that is when even end users come into contact with the Debugger. When a program crashes, you're confronted with this alert :</p>
<p>It offers four options to react to the crash:</p>
<ul>
<li><p><spanclass="button">Terminate</span> will clean up after the crashed app but otherwise does nothing further.</p></li>
<li><p><spanclass="button">Debug</span> will start the Debugger for further investigation.</p></li>
<li><p><spanclass="button">Save report</span> creates a debug report which is saved as a text file on the Desktop and can be emailed to the developer of the crashed app or attached to a ticket at its bugtracker, if available.<br/>
The debug report contains information on your hardware (type of CPU and used memory etc.), the exact version of Haiku and all available information on the state of the system that could be relevant to the crash.</p></li>
<li><p><spanclass="button">Write core file</span> creates a possibly huge dump of the system's state. Better attach a regular debug report first when submitting a bug report and only provide a core file on request.</p></li>
</ul>
<p>The default action when a crash happens can be configured with a text file <spanclass="path">~/config/settings/system/debug_server/settings</span>.<br/>
The file takes on a driver_settings style format as follows:</p>
<tr><td>user</td><tdstyle="width:30px"></td><td>Prompt the user for action.</td></tr>
<tr><td>kill</td><td></td><td>Silently terminate the crashing team.</td></tr>
<tr><td>debug</td><td></td><td>Attach the debugger to the crashing team.</td></tr>
<tr><td>log / report</td><td></td><td>Save a crash report and terminate the team.</td></tr>
<tr><td>core</td><td></td><td>Save a (possibly very large) core file and terminate the team.</td></tr>
</table>
<p>If no default_action is specified, "user" is assumed.</p>
<p>The executable_actions subsection contains individual overrides of the default. These take the form above, where the individual lines can be only a team name, or a path, with wildcards.</p>
<p><br/></p>
<hr/>
<p><br/></p>
<p>Describing the usage of the actual Debugger is out of scope for this guide that is addressing the needs of the common user of Haiku. For completeness sake, here's the window that'll come up if you choose the <spanclass="button">Debug</span> option in the above alert:</p>
<p>As you'll quickly see when you start poking around a bit, the Debugger is one of the most complex and sophisticated applications for Haiku. If you're a developer and are used to graphical debuggers on other platforms, many features will be familiar to you.</p>
<p>Below are a few links that may shed some light on the intricacies of Haiku's Debugger. If you have a specific question, you may want to consider posting it on the <ahref="http://www.freelists.org/list/haiku-development">development mailing list</a>. If you find more useful resources, please file a <ahref="../../../welcome/en/bugreports.html">bugreport</a> with that info.</p>
<tr><tdclass="onelinetop"><ahref="https://www.dropbox.com/s/e6gx39r0asc2t8f/DebuggerReferenceManual.pdf?dl=1">Debugger Reference Manual</a></td><td></td><td>This is the most in-depth source on how to work with the Debugger.</td></tr>
<tr><td><ahref="https://www.haiku-os.org/blog/anevilyak/">Blogposts</a></td><td></td><td>There are a few articles on the Debugger, mostly by Rene Gollent after implementing a new feature.</td></tr>
<tr><tdclass="onelinetop"><ahref="https://www.youtube.com/watch?v=n-NDFwtmQcI&list=PL2KiE-VO9zk-9XPmfusEDaOFd_7AiVKzz">BeGeistert 026 video</a></td><td></td><td>A video from the BeGeistert meeting in 2012, in which Ingo Weinhold demonstrates the state of the Debugger back then and shows other interesting tools like the profiler to hunt down bottlenecks.</td></tr>