Using breakpoints and watchpoints

The Breakpoints view lists all the breakpoints and watchpoints you've set in your open projects:

Breakpoints view

The Breakpoints view shows you existing breakpoints and watchpoints that are currently set.

A breakpoint makes your program stop whenever a certain point in the program is reached. For each breakpoint, you can add conditions to better control whether or not your program stops.

A watchpoint is a special breakpoint that stops the program's execution whenever the value of an expression changes, without specifying where this may happen. Unlike breakpoints, which are line-specific, watchpoints are event-specific and take effect whenever a specified condition is true, regardless of when or where it occurred.

An event breakpoint is similar to breakpoint that's set on a specific event rather than a specific line of source code.

Object Icon
Breakpoint

Icon: Breakpoint

Watchpoint (read)

Icon: Watchpoint; read

Watchpoint (write)

Icon: Watchpoint; write

Watchpoint (read and write)

Icon: Watchpoint; read and write

Note: If the breakpoint or watchpoint is for a connected target, the IDE places a check mark on the icon. For example:

Icon with an overlaid check mark

Related concepts
Inspecting your registers
Inspecting a process's memory
Inspecting shared-library usage
Monitoring signal handling
Viewing your output
Interacting with GDB
Related tasks
Inspecting variables
Changing variable values
Controlling the display of variables
Changing variable to a different type
Viewing variables in memory
Evaluating your expressions