Debugging an Instance

You can enable debug mode for a VM. In debug mode, project members with Owner,
Editor, Viewer, and App Engine Admin roles have root access to the
VM.
While debug mode is turned on, the automatic rollout of operating system
updates and security patches is disabled. However, the VM is still part of the
load balancer pool, and continues to receive external requests.

Whenever you enable or disable debugging, a "VM instance debugging enable/disable"
event appears in the Google Cloud Platform Console and the event will be logged in the VM's
/var/log/syslog.log file.

Important: Any changes you make to the VM while in debug mode are temporary:
you will lose your changes when you disable debug mode.

Enabling and disabling debug mode

You can use gcloud to enable and disable debug mode for an
instance.

Note: To enable debug mode in the Google Cloud Platform Console, you must connect using SSH.