Debugging with text output

We can build a very handy debugging tool by outputting the values of critical variables or other informative indicators of progress, either to an external text file or to a table created for this purpose. We need to either do this in single user mode or make it multiuser by including the USER ID on every entry.

This technique allows us to run a considerable volume of test data through the system, tracking some important elements while collecting data on the variable values, progress through various sections of code, and so on. We can even timestamp our output records so that we can use this method to look for processing speed problems.

Following the test run, we can analyze the results of our test more quickly, than if we were using displayed information. We can focus on just the items that appear most informative and ignore the rest. This type of debugging is fairly easy to set up and to refine, as we identify the variables or code segments of most interest. We can combine this approach with the following approach using the ERROR statement, if we output to an external text file, then close it before invoking the ERROR statement so that its contents are retained following the termination of the test run.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.196.146