Home > Class Reference > ENSLIB namespace > %Atelier.v1.XDebugAgent
Private  Storage   

%Atelier.v1.XDebugAgent


class %Atelier.v1.XDebugAgent extends
%CSP.WebSocket

This class serves as a debug agent for debugging cache processes It receives client debugging commands, sends then to the debug target, gets responses, and sends them back to the client. The implementation is based on the XDEBUG DBGP protocol used by the eclipse DLTK http://xdebug.org/docs-dbgp.php

Inventory


Parameters Properties Methods Queries Indices ForeignKeys Triggers
10 19 44


Summary


Properties
AtEnd Attached BinaryData BreakPoints
Command ContinuationCmdIssued Debug DebugTarget
DeviceList Features FirstRunCommandSeen GWClientAddress
LastContinuationCmd Launched NextState NoDataFraming
SessionId SharedConnection StackLevelMappings TargetOrPID
Trace TraceNode TransactionId WebSocketDevice
WebSocketID

Methods
%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IsA %IsModified %New
%NormalizeObject %ObjectModified %OriginalNamespace %PackageName
%RemoveFromSaveSet %SerializeObject %SetModified %ValidateObject
Attach ConvertParameter CreateErrorResponse CreatePropertyResponse
Decrypt Encrypt EndServer EscapeHTML
EscapeURL GetClassProperties GetClientPosFromDebugPos GetInitMsg
GetStackProperties HyperEventCall HyperEventHead Include
InitTrace Initialize InitializeServer InsertHiddenField
InsertHiddenFields Interpolate IsPrivate Launch
Link MapCommandToHandler OnClientMessage OnHTTPHeader
OnPage OnPageError OnPostHTTP OnPostHyperEvent
OnPostServer OnPreHTTP OnPreHyperEvent OnPreServer
OpenServer ParseCommand QuoteJS Read
ReportError ReportEvent RewriteURL Server
ShowError StartTimer StopTimer ThrowError
TidyUp Trace UnescapeHTML UnescapeURL
Write break breakpoint_get breakpoint_list
breakpoint_remove breakpoint_set breakpoint_update context_get
context_names eval feature_get feature_set
property_get property_set property_value requote
run stack_get stderr stdin
stdout step_into step_out step_over
stop watchpoint_set


Parameters


• parameter CLASS = 2;
This is the CLASS context for variable display in the IDE
• parameter DOMAIN = "%XDEBUG";
Parameter for Localization
• parameter EXITSTATE = 1;
• parameter IDLE = "OnIdle";
• parameter NULLSTATE = 0;
• parameter PRIVATE = 0;
This is the PRIVATE context for variable display in the IDE
• parameter PUBLIC = 1;
This is the PUBLIC context for variable display in the IDE
• parameter SECURITYRESOURCE = "%Development";
Require development resource
• parameter STOP = 2;
• parameter TIMEOUT = "0.1";

Properties


• property Attached as %Boolean [ InitialExpression = 0 ];
This holds the attached flag
• property BreakPoints as %String [ MultiDimensional ];
Breakpoints
• property Command as %String [ MultiDimensional ];
This holds the current command
• property ContinuationCmdIssued as %Boolean [ InitialExpression = 0 ];
This holds the Continuation command issued flag
• property Debug as %Debugger.System;
This holds the debugger instance
• property DebugTarget as %String;
This holds the debug_target (passsed to us by set_feature)
• property DeviceList as %List;
This holds the device list for $System.Socket.Select
• property Features as %String [ MultiDimensional ];
This holds the values of the features set by the IDE
• property FirstRunCommandSeen as %Boolean [ InitialExpression = 0 ];
This holds the first run command flag
• property LastContinuationCmd as %String;
This holds the last 'continuation' command issued Continuation commands are 'run','step_into','step_over','step_out' 'stop' and 'detach'. We need to record this so that the appropriate status message can be reported to the client when a breakpoint is hit or the program ends.
• property Launched as %Boolean [ InitialExpression = 0 ];
This holds the launched flag
• property NextState as %String [ InitialExpression = ..#NULLSTATE ];
This holds the next state to switch to
• property StackLevelMappings as %Integer [ MultiDimensional ];
This holds the cache stack level mappings to IDE stack level mappings
• property TargetOrPID as %String;
This holds the target OR PID
• property Trace as %Boolean [ InitialExpression = $Get(^CacheTemp.ISC.Atelier("debug"))>0 ];
This holds the TRACE flag
• property TraceNode as %Integer;
This holds the TRACE global node for this session
• property TransactionId as %String [ MultiDimensional ];
This holds the current transaction identifier
• property WebSocketDevice as %String;
This holds the websocket device

Methods


• method Attach() as %Status
Utility method to launch the target given the properties set by set_feature
• method CreateErrorResponse(pCmd As %String, pErrorCode As %Integer, pTransactionId As %Integer, pMsg As %String) as %String
Create an error response including error code and message to be displayed by IDE
• method CreatePropertyResponse(pVarName As %String, pVarValue As %String, Output pXML As %String, pNumChildren=0) as %Status
Given a variable name and a value, create a property for reporting to the IDE
• method GetClassProperties(Output pPropList As %String) as %Status
Get the properties for the CLASS context
• classmethod GetClientPosFromDebugPos(pServerIntPos, Output pMapped, ByRef pNameSpace, Output pDocName, Output pLabel, Output pOffset)
This method is given the debugger position (in the INT code) and returns a logical docname,label and offset The client will have to perform addtional logic to find exactly where in the source document the location is If pMapped is 0, then there is no source
• method GetInitMsg(Output pInitMsg) as %Status
Get InitMsg
• method GetStackProperties(pContext As %Integer, pCacheLevel As %Integer, Output pPropList As %String) as %Status
Given a context (LOCAL,GLOBAL) and CacheStack level, get the variables defined at that level
• method InitTrace()
Intialize the trace (if required)
• classmethod Interpolate(pString, pTerm, pValue) as %String
Utility method to interpolate values in a string
• method Launch() as %Status
Utility method to launch the target given the properties set by set_feature
• method MapCommandToHandler(pCmdString As %String) as %Status
Map the command to the associated handler (assumes valid command) Some commands are handled inline
• method OnPreServer() as %Status
Event handler for the PreServer event: this is invoked before starting the WebSockets Server. Changes to the SharedConnection flag must be made here.
• method ParseCommand(pCmdString As %String, Output pParsed) as %Status
Parse XDebug command Definition:- cmd : cmdname [ arglist ]; cmdname : lowercase STRING arglist : arg | [ arg arglist ]; arg : argid argval argid : '-' CHAR argval : STRING Example:- feature_get -i 6 -n language_supports_threads The command string is parsed into this structure:- var="feature_get" var("-i")=6 var("-n")="language_supports_threads"
• method ReportError(pErrorText As %String) as %Status
Report an event by writing to the WebSocket
• method ReportEvent(pEvent As %String, pXmlData="") as %Status
Report an event by writing to the WebSocket
• method Server() as %Status
The WebSocket Server
• method TidyUp(pStatus) as %Status
Here we do state specific tidy up (will be called if an error has occurred)
• method Trace(pMsg As %String)
Log a trace if tracing enabled
• method break() as %Status
IDE Command handler FOR 'break' command
• method breakpoint_get() as %Status
breakpoint_get -d User.Debug.cls:DebugMe:3 -i 51"
• method breakpoint_list() as %Status
breakpoint_list
• method breakpoint_remove() as %Status
breakpoint_remove
• method breakpoint_set() as %Status
IDE Command handler FOR 'breakpoint_set' command breakpoint_set -m DebugMe -n 3 -r 0 -s enabled -t line -f file:///Users/jamien/eclipse/runtime-EclipseApplication/XDebug/User.Debug.cls -i 10"
• method breakpoint_update() as %Status
breakpoint_update
• method context_get() as %Status
IDE Command handler FOR 'context_get' command
• method context_names() as %Status
IDE Command handler FOR 'context_names' command
• method eval() as %Status
IDE Command handler for 'eval' command
• method feature_get() as %Status
IDE Command handler FOR 'feature_get' command
• method feature_set() as %Status
IDE Command handler FOR 'feature_set' command
• method property_get() as %Status
IDE Command handler for 'property_get' command
• method property_set() as %Status
IDE Command handler for 'property_set' command
• method property_value() as %Status
IDE Command handler for 'property_value' command
• classmethod requote(value As %String) as %String
Given a string that is the output of Quote(), check for control characters that were left inside a quoted literal. If found, Quote that literal and insert it back into the original string. This is done carefully so we don't end up with double-double quotes.
• method run() as %Status
IDE Command handler FOR 'run' command
• method stack_get() as %Status
IDE Command handler FOR 'stack_get' command
• method stderr() as %Status
• method stdin() as %Status
IDE Command handler FOR 'stdin' command
• method stdout() as %Status
• method step_into() as %Status
IDE Command handler for 'step_into' command
• method step_out() as %Status
IDE Command handler for 'step_over' command
• method step_over() as %Status
IDE Command handler for 'step_over' command
• method stop()
IDE Command handler FOR 'stop' command
• method watchpoint_set() as %Status
IDE (pseudo) Command handler FOR 'watchpoint_set' command breakpoint_set -m DebugMe -n 2 -r 0 -s enabled -t watch -f file:///Users/haiodo/Develop/workspaces/runtime-New_configuration222/Demo3/User.Debug.cls -i 22 -- WA==