Reference documentation and code samples for the Stackdriver Debugger Client class Debuggee.
This class represents a debuggee - a service that can handle breakpoints.
Example:
use Google\Cloud\Debugger\DebuggerClient;
$client = new DebuggerClient();
$debuggee = $client->debuggee('debuggeeid');
Methods
__construct
Instantiate a new Debuggee.
Parameters | |
---|---|
Name | Description |
connection |
Google\Cloud\Debugger\Connection\ConnectionInterface
|
info |
array
Configuration options. |
↳ id |
string
Unique identifier for the debuggee generated by the controller service. |
↳ project |
string
Project the debuggee is associated with. Use the project number when registering a Google Cloud Platform project. |
↳ uniquifier |
string
Debuggee uniquifier within the project. Any string that identifies the application within the project can be used. Including environment and version or build IDs is recommended. |
↳ description |
string
Human readable description of the debuggee. Including a human-readable project name, environment name and version information is recommended. |
↳ isInactive |
string
If set to true, indicates that the debuggee is considered as inactive by the Controller service. |
↳ agentVersion |
string
Version ID of the agent release. The version ID is structured as following: domain/type/vmajor.minor (for example google.com/gcp-java/v1.1). |
↳ status |
string
Human readable message to be displayed to the user about this debuggee. Absence of this field indicates no status. The message can be either informational or an error status. |
↳ extSourceContexts |
ExtendedSourceContext[]
References to the locations and revisions of the source code used in the deployed application. |
↳ labels |
array
A set of custom debuggee properties, populated by the agent, to be displayed to the user. |
id
Return the debuggee identifier.
Example:
echo $debuggee->id();
Returns | |
---|---|
Type | Description |
string |
register
Register this debuggee with the Stackdriver backend.
Example:
$debuggee->register();
echo $debuggee->id();
Parameter | |
---|---|
Name | Description |
options |
array
|
Returns | |
---|---|
Type | Description |
bool |
breakpoints
Fetch the list of breakpoints this debugee should try to handle.
Example:
$breakpoints = $debuggee->breakpoints();
Parameters | |
---|---|
Name | Description |
options |
array
Configuration options. |
↳ waitToken |
string
A wait token that, if specified, blocks the method call until the list of active breakpoints has changed, or a server selected timeout has expired. The value should be set from the last returned response. |
Returns | |
---|---|
Type | Description |
array<Google\Cloud\Debugger\Breakpoint> |
breakpointsWithWaitToken
Fetch the list of breakpoints this debugee should try to handle and a wait token for the next request. The return value is an associative array with keys of breakpoints and nextWaitToken.
Example:
$resp = $debuggee->breakpointsWithWaitToken();
$nextWaitToken = $resp['nextWaitToken'];
$breakpoints = $resp['breakpoints'];
Parameters | |
---|---|
Name | Description |
options |
array
Configuration options. |
↳ waitToken |
string
A wait token that, if specified, blocks the method call until the list of active breakpoints has changed, or a server selected timeout has expired. The value should be set from the last returned response. |
Returns | |
---|---|
Type | Description |
array |
updateBreakpoint
Update the provided, modified breakpoint.
Example:
$debuggee->updateBreakpoint($breakpoint);
Parameters | |
---|---|
Name | Description |
breakpoint |
Google\Cloud\Debugger\Breakpoint
The modified breakpoint. |
options |
array
[optional] Configuration options. See {@see \Google\Cloud\Debugger\Google\Cloud\Core\RequestWrapper::__construct()} for configuration options which apply to all network requests. |
Returns | |
---|---|
Type | Description |
void |
setBreakpoint
Set a breakpoint for this debuggee.
Example:
$breakpoint = $debuggee->setBreakpoint('DebuggerClient.php', 10);
Parameters | |
---|---|
Name | Description |
path |
string
Path to the source file. |
line |
int
Line within the source file. |
options |
array
[optional] Array of Breakpoint constructor arguments. See {@see \Google\Cloud\Debugger\Google\Cloud\Debugger\Breakpoint::__construct()} for configuration details. See {@see \Google\Cloud\Debugger\Google\Cloud\Core\RequestWrapper::__construct()} for configuration options which apply to all network requests. |
updateBreakpointBatch
Update multiple breakpoints.
Example:
$debuggee->updateBreakpointBatch([$breakpoint1, $breakpoint2]);
Parameters | |
---|---|
Name | Description |
breakpoints |
array<Google\Cloud\Debugger\Breakpoint>
The modified breakpoints. |
options |
array
[optional] Configuration options. See {@see \Google\Cloud\Debugger\Google\Cloud\Core\RequestWrapper::__construct()} for configuration options which apply to all network requests. |
Returns | |
---|---|
Type | Description |
void |
info
Return a serializable version of this object
Returns | |
---|---|
Type | Description |
array |