Debugging Using COBOL Watchpoints

Restriction: This topic applies to native COBOL only.

Native code applications can cause memory overflows by occasionally writing in memory when they should not. If you cannot locate the line of code that is responsible for the overflow, you can use the COBOL Watchpoints feature to watch the area of memory in question.

Enterprise Developer COBOL watchpoints are a type of breakpoint that help you track memory corruption in native COBOL code; however, rather than setting watchpoints on specific lines of code, you set them on individual data items. A watchpoint enables 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 that changes the data.

You can set watchpoints on data items in any section of the code. See To set a COBOL watchpoint in native COBOL code for details.

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