Opens the dBASE Plus Debugger.

Syntax

DEBUG
[<filename> | ? | <filename skeleton> [WITH <parameter list>]]

<filename> | ? | <filename skeleton>

The program file to debug. DEBUG ? and DEBUG <filename skeleton> display the Open Source File dialog box, from which you can select a file. If you specify a file without including its path, dBASE Plus looks for the file in the current directory, then in the path you specify with SET PATH. If you specify a file without including its extension, dBASE Plus assumes .PRG.

WITH <parameter list>

Specifies expressions to pass as parameters to a program. For information about parameter passing, see the description of PARAMETERS.

Description

Use DEBUG to open the Debugger and view or control program execution interactively. You must issue DEBUG in the Command window; the command has no effect in a program. If you issue DEBUG without any options, dBASE Plus opens the Debugger without loading a program file. (You can load a file to debug from the Debugger.)

To debug a function, open the program file that contains the function, and set a breakpoint at the FUNCTION or PROCEDURE line. When the function is called, the debugger will appear, at the breakpoint that you set.

If an unhandled exception or error occurs during program execution, the standard error dialog gives you the option of opening the Debugger at the line where the error occurred.

For more information, see Using the Debugger, which describes the Debugger in detail.