Stackdriver Debugger Client - Class VariableTable (1.4.16)

Reference documentation and code samples for the Stackdriver Debugger Client class VariableTable.

This class represents a collection of Variables that are referenced by index within a Breakpoint. Its main use to reduce duplication of identical objects by checking a unique identifier for objects.

Example:

use Google\Cloud\Debugger\VariableTable;

$variableTable = new VariableTable();

Methods

__construct

Initialize a new VariableTable with optional initial values.

Parameters
NameDescription
initialVariables array<Google\Cloud\Debugger\Variable>
options array

Configuration options.

↳ maxMemberDepth int

Maximum depth of member variables to capture. Defaults to 5.

↳ maxPayloadSize int

Maximum amount of space of captured data. Defaults to 32768.

↳ maxMembers int

Maximum number of member variables captured per variable. Defaults to 1000.

↳ maxValueLength int

Maximum length of the string representing the captured variable. Defaults to 500.

setOptions

Update evaluation options.

Parameters
NameDescription
options array

Configuration options.

↳ maxMemberDepth int

Maximum depth of member variables to capture. Defaults to 5.

↳ maxPayloadSize int

Maximum amount of space of captured data. Defaults to 32768.

↳ maxMembers int

Maximum number of member variables captured per variable. Defaults to 1000.

↳ maxValueLength int

Maximum length of the string representing the captured variable. Defaults to 500.

register

Register a variable in the VariableTable and return a Variable reference.

The reference should be stored in the correct Breakpoint location.

Example:

$variableReference = $variableTable->register('varName', 'some value');
Parameters
NameDescription
name string

The name of the variable

value mixed

The value of the variable

hash string|null

[optional] The object hash to use for deduping

Returns
TypeDescription
Google\Cloud\Debugger\Variable

bufferFullVariable

Returns the reference for the buffer full variable.

Returns
TypeDescription
Google\Cloud\Debugger\Variable

isFull

Returns whether or not the variable table is full or not.

Returns
TypeDescription
bool

info

Return a serializable version of this object

Returns
TypeDescription
array

variables

Return the shared variables

Example:

$variables = $variableTable->variables();
Returns
TypeDescription
array<Google\Cloud\Debugger\Variable>

Constants

DEFAULT_MAX_MEMBER_DEPTH

Value: 5

DEFAULT_MAX_PAYLOAD_SIZE

Value: 32768

DEFAULT_MAX_MEMBERS

Value: 1000

BUFFER_FULL_MESSAGE

Value: 'Buffer full. Use an expression to see more data.'

MIN_REQUIRED_SIZE

Value: 100

DEFAULT_MAX_STRING_LENGTH

Value: 500