Previous Topic: Set Unconditional Breakpoints on the Source ListingNext Topic: Display the Value of a Variable


Inspect and Modify Main Storage

The ability to inspect main storage at a breakpoint means you can determine the values of variables without using a dump. It is easy to find logic errors because you can display the value of a variable where it is defined and at any point in the code where it's referenced. You can also dynamically change its value to correct errors or test other program paths.

Remember that changes to program storage are dynamic; that is, the change affects only the current test session. To correct program errors, you must change the source code and recompile the program.

There are many ways to inspect and modify main storage. We are going to discuss one of the easiest methods of viewing and changing program storage here. For another easy way to display and modify the values of variables, see Keeping Variables in the Keep Window.

Remember, you can inspect system storage at any time, independent of program monitoring and execution.