Re: Debugging SQL*Forms

From: Adrian Brooks <ade_at_PRO-RIS>
Date: Wed, 6 Apr 1994 15:28:22 GMT
Message-ID: <CnuGBA.8Ht_at_carmen.logica.co.uk>


Diana Tracy (bs794_at_cleveland.Freenet.Edu) wrote:

: In a previous article, bpearc1_at_tisdec.tis.tandy.com (Byron Pearce) says:
 

: >I was just wondering if anyone had a refined method of debugging an SQL*Forms
: >form (we are using 3.0). It's kind of new of new to me and reminds me a lot
: >of "spaghetti code" at this point (control jumping all over the place from
: >trigger to procedure, back to trigger, and finally back to the user).
: >
: >Any assistance would be greatly appreciated.
: >
: >==============================================================================
: >Byron Pearce | The thoughts and views herein do not
: >Tandy Information Services | necessarily reflect that of Tandy
: >bpearc1_at_tisdec.tis.tandy.com | Corporation.
: >------------------------------------------------------------------------------
: >"The Ten Commandments are not multiple choice." - Anonymous
: >==============================================================================
: >
: >
: >
: Well, this is certainly not refined, but it helps:
 

: Set the Debug Mode. It will show you what triggers are firing when you
: run the form.
 

: Use the message() function to report variable status.
 

: Put breaks into your triggers and procedures to check the SYSTEM and Page
: 0 fields.
 

: --
: Diana Tracy, System Designer -- Excitement, Adventure
: bs794_at_cleveland.Freenet.Edu -- and Really Wild Things

Another solution is to write a user exit (trace is a good name) that has an interface procedure (also called trace) which is called from triggers or procedures with free form text as a parameter. This text is written to an OS file by the user exit and can be monitored while the form is running. This can be achieved with the procedure only using a host command but the user exit is much more flexible.

If running under unix use tail -f to monitor the debug file as messages get written to it.

This method a number of advantages over using message: the file with the debug messages is kept after the form has finished running; to turn off trace the procedure can be made into a single comment with only NULL as the procedure body and the form recompiled allowing the trace procedure to be left in live code; and you do not need to acknowledge each debug message.

Ade Received on Wed Apr 06 1994 - 17:28:22 CEST

Original text of this message