Skip to main content

This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRIS, see the InterSystems IRIS Adoption Guide and the InterSystems IRIS In-Place Conversion Guide, both available on the WRC Distributions page (login required).

Previous sectionNext section

DEBUG

Interrupts program execution to enter debug mode.

Synopsis

DEBUG

Arguments

None.

Description

The DEBUG statement interrupts program execution by issuing a break to another stack level and issues a prompt. From this point you can issue debug commands, including returning to the execution of the interrupted program.

By default, a command issued at the debug prompt is an ObjectScript command. To issue a Caché MVBasic statement at the debug prompt, you must prefix a semicolon to the command. This is shown in the following terminal example:

USER:;myvar="ABC"
USER:;DEBUG

<BREAK>+1^MVBASIC1048.mvi
Source Id: File: Line:0
USER 7d1>WRITE "my variable=",myvar
my variable=ABC
USER 7d1>;CRT "my variable",myvar
my variable     ABC
USER 7d1>
Copy code to clipboard

The ;/ Statement

At the debug prompt, you can use the ;/ statement to display the contents of a variable. The variable may be subscripted. The syntax is as follows:

;/varname

The ;/ statement returns varname=value. It can be used to display the value of a local variable, an array dimensioned with DIM, a variable defined using EQUATE, or a variable defined in a COMMON statement.

The ;/ statement can return COMMON variables that are defined in different accounts (namespaces).

See Also

Feedback