Caché MultiValue Basic Reference
[Home] [Back] [Next]
InterSystems: The power behind what matters   
Class Reference   

Interrupts program execution to enter debug mode.
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 a 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:

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>
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:
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