Debugger: Troubleshooting

Error Console

The first place to look when you're having trouble is the error console. In Eclipse, this is just the "Console" window. In Ghidra, it can be accessed from the main application window. Sometimes it reports known issues; sometimes it reports unexpected behavior; etc., which may be 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."

In the Dynamic Listing:

In the Objects provider:

In the Threads provider:

My Breakpoints Aren't Working

If your target is not breaking as expected, chances are the breakpoint has not actually been sent to the debugger. Breakpoints in the static listing are not necessarily effective for a target. Many things depend on tracing and module mapping to work correctly. Occasionally, either because of configuration options, or some other hiccup, these dependencies are not met. Futhermore, Ghidra can only send breakpoints to a target while it is suspended. If you are trying, for example, to break before "main", you must ensure Ghidra has a chance to place the breakpoint before the target would reach it. This may require using the command interpreter or changing your native debugger's options. Otherwise, verify that you are actually tracing the target where you expected a breakpoint to appear. Then, verify that the module containing your breakpoint has been mapped into the trace.

My Target is not Being Traced

If the dynamic listing is empty, chances are, you are not recording your target. If that is the case, right-click your target in the Objects window and select "Record". Please note that this action is enabled on any object, but is ignored if nothing knows how to record it. Currently, only user-mode processes running on a 64-bit x86 system are known to work well. Be sure you have selected the process, not a thread.

My Modules are not Mapped in

If changing your cursor location in the static listing does not automatically synchronize the dynamic listing to the same place, and vice versa, chances are the module is not mapped. (It is also possible you disabled this sync feature, but that is not usually the case.) You can also check the Static Mappings window to see if the memory ranges are mapped properly. To attempt to map the module, use the Modules window. Right-click the module where you expected to sync and select "Map Modules." If you do not see the program you expected, it may be because it is not named in a way that Ghidra would recognize it as the given module. Currently, the program's name must contain (case insensitive) the module's filename (ignoring the full path). A user action to remedy this is a known feature gap.