# Debugger: Troubleshooting

Often, it's a good idea to troubleshoot by using the target platform's recommended debugger without connecting it to Ghidra. If it doesn't work there, it's not likely to work in Ghidra, since it relies on that debugger. For Linux, use gdb; for Windows, use WinDbg; for macOS, use LLDB.

## Error Console

The first place to look when you're having trouble is the Debug Console. Second, if you're running from Eclipse, you can check its "Console" window. Often, Ghidra's Debug Console will offer actions to help you resolve a well-known issue or configuration problem. It also duplicates the error log when those messages are emitted from a debugger-related component. These typically offer clues to exactly what has gone wrong.

## Settings and Toggles

This list is not exhaustive, but here are some options to examine if you're having trouble. In the FrontEnd tool, under Edit → Tool Options, select "Debugger.Workflow."

- "Map modules..." and "Map sections..." control how the debugger attempts to map static and dynamic memory.
- "Disassemble..." triggers automatic disassembly in the dynamic view.
- "Show debugger interpreter..." automatically provides access to the command line.

In the Dynamic Listing:

- "Sync to Static Listing" controls the tracking of the Static listing.

In the Objects provider:

- "Record Automatically" causes a trace to be started when a Process object comes into view. If the process object is not exposed automatically, you may have to expand the tree to trigger the trace. If auto-record is toggled off, you'll need to hit "Record (R)" with the process selected to start a trace.
- "Subscribe to..." causes a particular object to be tracked by the trace. Processes, threads, registers, memory, stack, and so forth are tracked automatically, but you may wish to add other objects ad hoc.

In the Threads provider:

- The "Track the tool to the latest snap" toggle determines whether the caret (and all resulting information) should track the current thread position as it updates.
- The "Synchronize trace activation..." toggle attempts to maintain synchronization between the Object provider (i.e. the active target information) and the trace.

In the Debugger menu:

- The "Save Traces By Default" toggle causes traces to be saved into the Ghidra project database at the end of a session. (Open sessions will be re-opened with the tool in the Threads window, reflected in the thin tabs at its top.)

Additional troubleshooting recommendations are given in the Debugger course materials.