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 \ DebuggerMethods
__construct
Initialize a new VariableTable with optional initial values.
| Parameters | |
|---|---|
| Name | Description |
initialVariables | array<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 |
Variable | |
bufferFullVariable
Returns the reference for the buffer full variable.
| Returns | |
|---|---|
| Type | Description |
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<Variable> | |
Constants
DEFAULT_MAX_MEMBER_DEPTH
Value: 5DEFAULT_MAX_PAYLOAD_SIZE
Value: 32768DEFAULT_MAX_MEMBERS
Value: 1000BUFFER_FULL_MESSAGE
Value: 'Buffer full. Use an expression to see more data.'MIN_REQUIRED_SIZE
Value: 100DEFAULT_MAX_STRING_LENGTH
Value: 500