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

  1. Breakpoints – Halt program execution at specific points.

  2. Step Execution – Run code line-by-line to trace logic.

  3. Watch Expressions – Monitor variable values in real-time.

  4. Memory Dump – View raw memory contents.

  5. 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