Debug with Watchpoint

About this task

To start debugging with the watchpoint enabled:
  1. Right-click on the .launch configuration.
  2. Debug with the GDB Run Configuration.

When the selected variable is accessed according to the configured watchpoint condition, the debugger automatically halts execution at the corresponding source line.

You can inspect on the following:
  • Variable values
  • Memory contents
  • Registers
  • Call stack information

This helps to identify where and when the variable changes during program execution.

Figure 1. Debug with Watchpoint