Stackdriver Debugger Client - Class VariableTable (1.8.8)

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();

Namespace

Google \ Cloud \ Debugger

Methods

__construct

Initialize a new VariableTable with optional initial values.

Parameters
Name Description
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
Name Description
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
Name Description
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
Type Description
Google\Cloud\Debugger\Variable

bufferFullVariable

Returns the reference for the buffer full variable.

Returns
Type Description
Google\Cloud\Debugger\Variable

isFull

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

Returns
Type Description
bool

info

Return a serializable version of this object

Returns
Type Description
array

variables

Return the shared variables

Example:

$variables = $variableTable->variables();
Returns
Type Description
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