---
title: "POST /v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug"
method: POST
path: "/v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug"
tags: ["apps"]
---

# POST /v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug

`POST /v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug`

Enables debugging on a VM instance. This allows you to use the SSH command to connect to the virtual machine where the instance lives. While in "debug mode", the instance continues to serve live traffic. You should delete the instance when you are done debugging and then allow the system to take over and determine if another instance should be started.Only applicable for instances in App Engine flexible environment.

## Path parameters

- `appsId` string, required
- `servicesId` string, required
- `versionsId` string, required
- `instancesId` string, required

## Request body

- DebugInstanceRequest — Request message for Instances.DebugInstance.
  - `sshKey` string — Public SSH key to add to the instance. Examples: [USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME] [USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}For more information, see Adding and Removing SSH Keys (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys).

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/appengine.md) · [All operations](https://skmtc.dev/google/apis/appengine/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/appengine/revisions/ee6b3d5f5200/schema)
