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 \ DebuggerMethods
__construct
Instantiate a new StackFrame.
function
string
Demangled function name at the call site.
location
addLocal
Register a local variable in this stack frame.
Example:
$stackFrame->addLocal($variable);
locals
Returns the captured locals for this stack frame.
Example:
$locals = $stackFrame->locals();
info
Return a serializable version of this object
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
]
]);
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