Reference documentation and code samples for the Stackdriver Debugger Client class Daemon.
This class is responsible for registering itself as a Debuggee with the Stackdriver backend. It will fetch the list of breakpoints from the Stackdriver backend, validate and normalize them, and store them into the configured breakpoint storage.
Example:
use Google\Cloud\Debugger\Daemon;
$daemon = new Daemon();
$daemon->run();
Namespace
Google \ Cloud \ DebuggerMethods
__construct
Creates a new Daemon instance.
options
array
Configuration options.
↳ sourceRoot
string
The full path to the source root. Defaults tothe current working directory.
↳ clientConfig
array
The options to instantiate the default DebuggerClient. DebuggerClient::__construct() for the available options.
↳ sourceContext
array
The source code identifier. Defaults tovalues autodetected from the environment.
↳ extSourceContext
array
The source code identifier. Defaults tothe $sourceContext option.
↳ uniquifier
string
A string when uniquely identifies this debuggee. Defaults toa value autodetected from the environment.
↳ description
string
A display name for the debuggee in the Stackdriver Debugger UI. Defaults toa value autodetected from the environment.
↳ storage
BreakpointStorageInterface
The breakpoint storage mechanism to use. Defaults toa new SysvBreakpointStorage instance.
↳ labels
array
A set of custom debuggee properties, populated by the agent, to be displayed to the user. Defaults tolabels detected from the environment.
↳ metadataProvider
MetadataProviderInterface
Defaults toAn automatically chosen provider, based on detected environment settings.
↳ closureSerializer
ClosureSerializerInterface
An implementation responsible for serializing closures used in the $clientConfig
. This is especially important when using the batch daemon. Defaults to Google\Cloud\Core\Batch\OpisClosureSerializer
if the opis/closure
library is installed.
↳ register
bool
Whether to start the worker in the background using the BatchRunner. Defaults tofalse.
run
Main loop for the daemon. Fetches breakpoints from the DebuggerClient and stores them in shared storage for the application to read. This function runs indefinitely.
Example:
$daemon->run();
client
?\Google\Cloud\Debugger\DebuggerClient
asDaemon
mixed