GCLOUD_DEBUG_SNAPSHOTS_CREATE(1)

NAME

gcloud debug snapshots create - create debug snapshots

SYNOPSIS

gcloud debug snapshots create LOCATION [--condition=CONDITION] [--expression=EXPRESSION] [--target=(ID|DESCRIPTION_REGEXP)] [--wait=WAIT; default="10"] [GCLOUD_WIDE_FLAG ...]

DESCRIPTION
This command creates a debug snapshot on a Cloud Debugger debug target. Snapshots allow you to capture stack traces and local variables from your running service without interfering with normal operations. 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.

POSITIONAL ARGUMENTS

    LOCATION
        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.

FLAGS

    --condition=CONDITION
        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.

    --expression=EXPRESSION
        An expression to evaluate when the snapshot is taken. You may specify --expression multiple times.

    --target=(ID|DESCRIPTION_REGEXP)
        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, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.