Stackdriver Debugger Client - Class Agent (1.9.4)

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 \ Debugger

Methods

__construct

Create a new Debugger Agent, registers all breakpoints for collection or execution, and registers a shutdown function for reporting results.

Parameters
Name
Description
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.

Parameters
Name
Description
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.

Parameters
Name
Description
level
mixed
message
string
context
array
Returns
Type
Description
void

reportBreakpoints

Callback for batch runner to report a breakpoint.

Parameter
Name
Description
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 
 
Design a Mobile Site
View Site in Mobile | Classic
Share by: