Reference documentation and code samples for the Stackdriver Debugger Client class Agent.
This class is responsible for registering all debugger breakpoints and logpoints for each request. It should be created as early as possible in your application.
Example:
use Google\Cloud\Debugger\Agent;
$agent = new Agent();
Namespace
Google \ Cloud \ DebuggerMethods
__construct
Create a new Debugger Agent, registers all breakpoints for collection or execution, and registers a shutdown function for reporting results.
options
array
Configuration options.
↳ storage
BreakpointStorageInterface
Breakpoint storage to fetch breakpoints from. Defaults toa new SysvBreakpointStorage instance.
↳ sourceRoot
string
Path to the root of the source repository. Defaults tothe directory of the calling file.
↳ logger
LoggerInterface
PSR-3 compliant logger used to write logpoint records. Defaults toa new Stackdriver logger.
↳ daemonOptions
array
Additional options to provide to the Daemon when registering.
↳ maxDepth
int
Limits the number of stackframes with captured variables. To capture variables in all stackframes, set to PHP_INT_MAX. Defaults to5.
↳ maxMemberDepth
int
Maximum depth of member variables to capture. Defaults to5.
↳ maxPayloadSize
int
Maximum amount of space of captured data. Defaults to32768.
↳ maxMembers
int
Maximum number of member variables captured per variable. Defaults to1000.
↳ maxValueLength
int
Maximum length of the string representing the captured variable. Defaults to500.
handleSnapshot
Callback for reporting a snapshot.
snapshot
array
Snapshot data
↳ id
string
The breakpoint id of the snapshot
↳ evaluatedExpressions
array
The results of evaluating the snapshot's expressions
↳ stackframes
array
List of captured stackframe data.
handleLogpoint
Callback for reporting a logpoint.
level
mixed
message
string
context
array
void
reportBreakpoints
Callback for batch runner to report a breakpoint.
breakpointsInfo
array
Constants
DEFAULT_LOGPOINT_LOG_NAME
Value: 'debugger_logpoints'
DEFAULT_APP_ENGINE_LOG_NAME
Value: 'appengine.googleapis.com%2Frequest_log'
DEFAULT_MAX_DEPTH
Value: 5