Tracing Memory Corruption with COBOL Watchpoints

Restriction: The following applies to native code only.
Native code applications can cause memory overflows by occasionally writing in memory when they should not. You might not be able to locate the line of code that is responsible for the overflow and the only way to find the problem is to watch the area of memory.

Your COBOL development system provides COBOL watchpoints to help you track memory corruption in native COBOL code. COBOL watchpoints are a type of breakpoint that you set on individual data items and not on lines of code. They enable you to watch an area of memory associated with the particular data item. When the memory is updated or a user-defined condition is satisfied (for example, memory updated a specific number of times), debugging stops on the line that immediately follows the line on which the data has changed.

You can set watchpoints on data items in any section of the code. Set a watchpoint either from the code (right-click a data item and select Add COBOL Watchpoint from the context menu), or from the Watchpoints (Native COBOL) window (shown by clicking Debug > Windows > COBOL Watchpoints).

Once a watchpoint is set, it is displayed and configured from the Watchpoints (Native COBOL) window, where you can: