TRACE (Short Name: TRA)
Top  Previous  Next

Use the TRACE command to debug command blocks, command files, or command files requiring passed parameters. [Ctrl] + [Shift] + [F12] will trace the next entry/exit procedure.

trace

Options

cmdfile

Specifies the name of the command file to debug.

IN procfile

Specifies the name of a procedure file. A procedure file is a compiled binary file that contains stored menu, screen, and command blocks. Include a drive and path name if the procedure file is not on the current drive and directory.

USING parmlist

Lists the values the command file will use when it executes. The parameter list can contain up to nine values. The first value in the list is referenced in the executed file as %1, the second as %2, and so on through %9. They are treated just like other variables. To reference the contents of these variables, preface the variable name with a dot (.); for example, set v1 = .%1.

Additional Options:

TRACE SELECT USING parmlist SELECT VARCHAR clause

About the TRACE Command

The TRACE command starts the R:BASE interactive debugger. It allows you to go through the command file line-by-line to facilitate debugging the code. The TRACE command must be on a line by itself and not combined with other commands. For TRACE to work correctly with a file encoded by CodeLock, the ASCII file must be present in the current drive and directory, and have the file extension of .APP. If TRACE cannot find the ASCII file, it does not go through the procedure file line-by-line when it runs.

Trace new features (Windows Only):


Immediately after you find error in the R:BASE debugger, you can correct bad syntax using RBEDIT.

To correct an error :

1.You start R:BASE debugger using trace command.  
2.A error point is found, R:BASE debugger display a error message and Do you modify this file? message.  
3.If you wish modify it at once, you click Yes button. RBEDIT is started and you move the cursor to the error point.  
4.You finish to correct error, save the file and exit RBEDIT.  
5.If you want to repeat debugging, you restart the R:BASE debugger using trace command.  

For more information about the Interactive Debugger, refer to the Online User Reference.

Examples

The following command displays the MYCMDFIL file for debugging in the current directory.

TRACE mycmdfil

The following command displays a command block for debugging named mycmdfil in a procedure file named MYPROCFL.APX.

TRACE mycmdfil IN myprocfl.apx


TRACE can also be used inside a command file to trace a block of code using the SET TRACE ON operating condition.