Stackdriver Debugger Client - Class StackFrame (1.6.4)

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

Represents a stack frame context.

Example:

 use Google\Cloud\Debugger\SourceLocation;
use Google\Cloud\Debugger\StackFrame;

$location = new SourceLocation('/path/to/file.php', 10);
$stackFrame = new StackFrame('function-name', $location); 

Namespace

Google \ Cloud \ Debugger

Methods

__construct

Instantiate a new StackFrame.

Parameters
Name
Description
function
string

Demangled function name at the call site.

location

addLocal

Register a local variable in this stack frame.

Example:

 $stackFrame->addLocal($variable); 
Parameter
Name
Description

locals

Returns the captured locals for this stack frame.

Example:

 $locals = $stackFrame->locals(); 
Returns
Type
Description

info

Return a serializable version of this object

Returns
Type
Description
array

static::fromJson

Instantiate a new StackFrame from JSON form

Example:

 $stackFrame = StackFrame::fromJson([
    'function' => 'function-name',
    'location' => [
        'path' => '/path/to/file.php',
        'line' => 10
    ]
]); 
Parameters
Name
Description
data
array

{ @type string $function Demangled function name at the call site. @type SourceLocation $location The source location }

↳ function
string

Demangled function name at the call site.

↳ location
SourceLocation

The source location

Returns
Type
Description
Design a Mobile Site
View Site in Mobile | Classic
Share by: