This class is used internally by Caché. You should not make direct use of it within your applications. There is no guarantee made about either the behavior or future operation of this class.
Studio debugging interface.
Current breakpoint information for target process property CSPId as
SessionId if attached to CSP process property Debug as
System Debugger object property IO as
I/O redirection flag property LastError as
Last error property Project as
Project property Watchpoints as
Current watchpoint information for target process property trace as
Attach to another process having process id of pid. method AttachToCSP(id As
Fails if already attached (use
Unattachfirst),or if pid is invalid.
On successful completion, process is attached and a break issued. The process will be in break mode upon completion of its current operation.
Attach to a CSP process, first you must call the method Break() as
GetCSPAttachIDto obtain the ID to pass to this method.
Send a BREAK to the target process. method ClearBreakpoints() as
A successful return indicates the target will be in break mode on completion of the current command.
Issue IsStopped to determine if target is in break mode.
method DBGCommand(cmd As
Perform a debug command. method DisableBreakpoint(routine As
method DisableWatchpoint(variable As
method Eval(expr As
Evaluate and return the value of expression expr within the target process. method GetCSPAttachID() as
To attach to a CSP process, first call this method which will return you a unique ID number. Then display the CSP page but add an extra parameter of 'CSPDEBUG=<ID>' for example 'http://localhost/csp/samples/loop.csp?CSPDEBUG=123456'. Then call the classmethod GetInfo(Job As
AttachToCSPmethod which will attach to the process that is running this CSP page.
Gather information about a process method GetOffset(ByRef RoutineName As
Return the current location of the debugger. This includes both the command and the argument positions. method GetSource() as
Return the routine source at the current location method GetStack() as
Gets the simple stack information sent from the target. method GetStackId() as
Requests stack variable info. method GetValue(variable As
Gets the value of a variable. method Go() as
Continue the current process method GoTo(tag As
Continue the current process classmethod INTLine(name As
Given a document name, label and line offset it returns the name and line corresponding to this in the INT code returntype values are method Interrupt() as
For example if you wish to find out which line is generated from class 'User.Test' in method 'MyMethod' at offset '+3' you call:
- 0 - Ok
- 1 - Line given is not mapped so returning the next mapped line as breakpoint instead
- 2 - No mapping found at all, nothing returnedtype is one of 'CLS' or 'MAC' currently.Set sc=##class(%Studio.Debugger).INTLine("User.Test.CLS","MyMethod",3,.intname,.intline,.returntype)
Interrupt the target process. The current command will be interrupted. Execution will proceed with the next command. method IsStopped() as
Returns 1 if the target is stopped in break mode. 0 indicates target is still running. 2 indicates target has exited debugger or fatal error. method Line() as
method LineIn() as
method LineOut() as
classmethod MappedFromLine(rtn As
Return the list of source files that the routine and line map to. The format of each source file data is: classmethod MappedFromPos(routineName As
Return the list of source files that the position passed in maps to. Each source file is separated by a space character. The format of each source file data is: method MappedOffset(ByRef mapping As
Return the list of source files that the current break point maps to starting with the INT/BAS routine. Each source file is separated by a space character. The format of each source file data is: method Pid() as
return process id of attached target classmethod ProcessListClose(QHandle As
classmethod ProcessListExecute(ByRef QHandle As
classmethod ProcessListFetch(ByRef QHandle As
method RemoveBreakpoint(routine As
method RemoveWatchpoint(variable As
method RoutineMap(current As
Check if routine is mapped to current namespace method SetBreakpoint(routine As
Returns 1 if successful, 0 if not mapped to current
method SetBreakpointsFromProject(project As
Set all break points defined in project. method SetValue(variable As
Return 0 if project=NULL, else return status code from SetBreakpoint
Sets a variable to a value. method SetWatchpoint(variable As
classmethod SourceLine(intName As
Given INT routine name and line number and offset in this line return an array of source lines that map to this INT line. The format of this return array is: method StartTarget(tag As
Where StartEnd is 1 for the start of the map and 2 for the end, sourceName is the name of the source file, sourceLabel is the method/label name, sourceLine is the number of lines from this label to the location, Offset is the offset on the line, Namespace is the location of the source file.
Job off a routine that executes tag. If breakpoints are specified, the target will halt at the first breakpoint. method Step() as
method StepIn() as
method StepOut() as
method Unattach(kill As
Unattach from the current process, if any. method ViewAsBinary(variableName As
Returns $$$OK if successful, $$$ERROR if nothing to detach from
classmethod WatchListClose(ByRef qHandle As
classmethod WatchListExecute(ByRef qHandle As
classmethod WatchListFetch(ByRef qHandle As
classmethod WatchListOrefClose(ByRef qHandle As
classmethod WatchListOrefExecute(ByRef qHandle As
classmethod WatchListOrefFetch(ByRef qHandle As
method WriteTarget(data As
Write to target process
Get the values of the specified $c(1)-separated list of variables. query WatchListOref(deb As
Get the properties of the specified variable whose value is an oref. %Studio.General::DumpObjectExecute implements logic to dump object and collect properties in qHandle array. WatchList query from %Studio.Debugger to deliver array to client.