Using Watchpoints
Prerequisites
You can use watchpoints for variables only during a running ABAP debug session.
Context
When debugging ABAP code, you can use watchpoints to track the value of individual ABAP variables. The ABAP debugger stops as soon as the value of a watched variable has changed. Furthermore, you can specify conditions for watchpoints. The debugger then additionally checks whether this condition is fulfilled.
Procedure
- Setting Watchpoints for Currently Selected Field in the Source Editor
- In the ABAP source code editor of the Debug perspective, position the cursor on the field in question.
- Open the context menu and select the option Set Watchpoint.
- Setting Watchpoints in the Variables View
- Specifying Conditions for Watchpoints
Results
Once the watchpoint has been created for the debug session, the value of the specified variable will be monitored. The ABAP debugger stops as soon as the value of the variable is changed after a debug step or the specified condition for the watchpoint is fulfilled.
Once the watchpoint is reached, the editor range indicator displays a small watchpoint decorator.