- gcloud beta debug snapshots create - create debug snapshots
gcloud beta debug snapshots create LOCATION [--condition=CONDITION] [--expression=EXPRESSION] [--target=(ID|DESCRIPTION_REGEXP)] [--wait=WAIT; default=10] [GCLOUD_WIDE_FLAG ...]
(BETA) This command creates a debug snapshot on a Cloud Debugger debug
When any instance of the target executes the snapshot location, the optional condition expression is evaluated. If the result is true (or if there is no condition), the instance captures the current thread state and reports it back to Cloud Debugger. Once any instance captures a snapshot, the snapshot is marked as completed, and it will not be captured again.
You can most easily view snapshot results in the developer console. It is also possible to inspect snapshot results with the "snapshots describe" command.
The location where the snapshot should be taken. Locations are of the form
FILE:LINE, where FILE can be simply the file name, or the file name preceded by
enough path components to differntiate it from other files with the same name.
If the file name is not unique in the debug target, the behavior is unspecified.
A condition to restrict when the snapshot is taken. When the snapshot location
is executed, the condition will be evaluated, and the snapshot will be generated
only if the condition is true.
An expression to evaluate when the snapshot is taken. You may specify
--expression multiple times.
The debug target. It may be a target ID or name obtained from 'debug targets
list', or it may be a regular expression uniquely specifying a debuggee based on
its description or name. For App Engine projects, if not specified, the default
target is the most recent deployment of the default module and version.
- --wait=WAIT; default=10
The number of seconds to wait to ensure that no error is returned from a
debugger agent when creating the snapshot. When a snapshot is created, there
will be a delay before the agents see and apply the snapshot. Until at least one
agent has attempted to enable the snapshot, it cannot be determined if the
snapshot is valid.
GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flags-file, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.
This command is currently in BETA and may change without notice. This variant is also available:
- $ gcloud debug snapshots create