Glossary · 5 · Hardware SDKs and devices
Debugger
Also known as: Debugging tool, Source-level debugger
German: Debugger
In software engineering, a debugger is a tool that lets a developer start, stop and step through a running program, set breakpoints and watchpoints and inspect variables, memory and registers, in order to find out what the program is doing or what it was doing when it failed.
- Hardware SDK
- Developer tools
In one sentence
A debugger lets developers control a running program, set breakpoints and inspect variables, memory and registers to find out why it fails.
Example
A developer stops a firmware build at a breakpoint in the interrupt handler, steps through it line by line and watches a status register change in the debugger's register view.
How it applies
- Hardware SDKs: Every hardware kit includes or names a debugger. For embedded targets the debugger runs on the development computer and reaches the target through a debug probe or a debug server; the GDB manual describes this remote debugging for systems that cannot run the debugger themselves, such as small embedded systems or an operating-system kernel.
- What it does: The GDB manual sums up the purpose of a debugger as letting the developer see what is going on inside another program while it executes, or what it was doing when it crashed: start it, make it stop on specified conditions, examine what has happened and change things to test a fix.
- On-target vs. host debugging: Host debugging runs the program on the development computer, often on an emulator or in a simulation of its environment. On-target debugging runs it on the real hardware, where timing, peripherals and memory limits are real. Both are usually needed.
- Developer and platform SDKs: Editors and IDEs connect to debuggers through protocols such as the Debug Adapter Protocol, which defines an abstract protocol between a development tool and a debugger so that one editor integration can serve many debuggers. Platform SDKs document how to attach a debugger to an extension running inside the host.
- Documentation: Debugging guides name the debugger and version, how to connect it, which build settings keep debug information and where symbols come from. Debugging as an activity also uses logging and tracing; the debugger is the tool for interactive inspection.
Debugger vs. debugging
Debugging is the activity of finding and removing faults. A debugger is one tool for it. Faults are also found through logs, traces, tests and code review, especially where stopping the program is not possible, for example in a running machine or a production service.
External references
- GNU Project: Debugging with GDB, chapters “Summary of GDB” and “Debugging Remote Programs”
- Microsoft: Debug Adapter Protocol