Definition
A debugger is a software tool used to test and debug programs by allowing programmers to examine and control program execution.
Purpose
-
Helps identify logical, runtime, and syntax errors in code.
-
Provides an environment to step through code, monitor variable values, and modify memory.
Key Features
-
Breakpoints – Halt program execution at specific points.
-
Step Execution – Run code line-by-line to trace logic.
-
Watch Expressions – Monitor variable values in real-time.
-
Memory Dump – View raw memory contents.
-
Call Stack – View the function call hierarchy during execution.
Types
-
Source-level debugger – Works with high-level languages (e.g., GDB for C/C++).
-
Machine-level debugger – Works with assembly or machine code.
-
Remote debugger – Debugs applications on a remote system.
Examples
-
GDB (GNU Debugger)
-
LLDB (LLVM Debugger)
-
Visual Studio Debugger
-
WinDbg