Stay organized with collectionsSave and categorize content based on your preferences.
With Cloud Code's Compute Engine integration, you can
view the Compute Engine VMs running your applications, establish
connections to your VMs using SSH, view application logs, and upload files to a
VM.
This document shows you how to access Compute Engine with
Cloud Code in your IDE and manage your VM instances.
View VMs
To view VMs in your Google Cloud project and the VM instance details in
the Google Cloud console, follow these steps:
Sign into Cloud Code if you haven't already, and select your
Google Cloud project.
To view VM instances in your Google Cloud project, in the activity bar
of your IDE, clickCloud Codeand then expand theCompute Engineexplorer.
To view the VM instance details in the Google Cloud console, right-click
the VM instance and selectOpen in Cloud Console.
Connect to a VM
To connect to the VM instance in your IDE with Cloud Code using the
built-in IDE terminal and SSH, follow these steps:
To connect to a VM instance, in theCompute Engineexplorer, hold the
pointer over the VM instance and clickterminalOpen SSHor right-click
the VM instance and selectOpen SSH.
A terminal appears, displaying information about the remote instance.
If the connection to the VM instance fails:
For Windows and Linux users, seeTroubleshooting SSH errorsfor common errors that you might run into when connecting to a VM using SSH,
ways to resolve errors, and methods for diagnosing failed SSH connections.
For macOS users, after pressing any key to clear the error message in the
terminal, an error message dialog appears. To view
information in the terminal about the issue and potential resolutions,
clickTroubleshoot. Or, to view theTroubleshooting SSH errorsdocumentation, clickLearn more.
View application logs on a VM
To view the application logs of a VM instance, follow these steps:
To view the application logs of a VM instance in Cloud Code,
right-click the VM instance and selectView Logs.
The Logs Viewer window appears in your IDE, allowing you to filter by log
type, time, severity, and instance.
To view logs in real time, turn on theStreamingtoggle.
To view the logging page for a particular VM instance in the Google Cloud console,
clickopen_in_newOpen in browser.
Upload a file to a VM
To copy application files from your local IDE to your remote VM instance, follow
these steps:
To upload a file to a VM, in the Cloud CodeCompute Engineexplorer, hold the pointer over the VM instance and clickcloud_uploadUpload File via SCP, or right-click the VM instance and selectUpload
File via SCP.
Navigate to the file that you want to upload and clickUpload.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eCloud Code enables you to view your Compute Engine VMs directly within your IDE, providing easy access to the details of each instance.\u003c/p\u003e\n"],["\u003cp\u003eYou can establish an SSH connection to your VMs using Cloud Code's built-in terminal, allowing for direct interaction with the remote instance.\u003c/p\u003e\n"],["\u003cp\u003eCloud Code allows you to view application logs for a specific VM instance, with options to filter by log type, time, severity, and instance, and also supports real-time log streaming.\u003c/p\u003e\n"],["\u003cp\u003eUsing Cloud Code, you can upload files from your local IDE to a Linux-based VM instance via SCP, streamlining the process of transferring application files.\u003c/p\u003e\n"]]],[],null,["# Manage VMs in Cloud Code for Cloud Shell\n\nWith Cloud Code's Compute Engine integration, you can\nview the Compute Engine VMs running your applications, establish\nconnections to your VMs using SSH, view application logs, and upload files to a\nVM.\n\nThis document shows you how to access Compute Engine with\nCloud Code in your IDE and manage your VM instances.\n\nView VMs\n--------\n\nTo view VMs in your Google Cloud project and the VM instance details in\nthe Google Cloud console, follow these steps:\n\n1. Launch the [Cloud Shell Editor](https://shell.cloud.google.com).\n\n2. Sign into Cloud Code if you haven't already, and select your\n Google Cloud project.\n\n3. To view VM instances in your Google Cloud project, in the activity bar\n of your IDE, click **Cloud Code** and then expand the\n **Compute Engine** explorer.\n\n4. To view the VM instance details in the Google Cloud console, right-click\n the VM instance and select **Open in Cloud Console**.\n\nConnect to a VM\n---------------\n\nTo connect to the VM instance in your IDE with Cloud Code using the\nbuilt-in IDE terminal and SSH, follow these steps:\n\n1. To connect to a VM instance, in the **Compute Engine** explorer, hold the\n pointer over the VM instance and click\n terminal **Open SSH** or right-click\n the VM instance and select **Open SSH**.\n\n A terminal appears, displaying information about the remote instance.\n2. If the connection to the VM instance fails:\n\n - For Windows and Linux users, see\n [Troubleshooting SSH errors](/compute/docs/troubleshooting/troubleshooting-ssh-errors)\n for common errors that you might run into when connecting to a VM using SSH,\n ways to resolve errors, and methods for diagnosing failed SSH connections.\n\n - For macOS users, after pressing any key to clear the error message in the\n terminal, an error message dialog appears. To view\n information in the terminal about the issue and potential resolutions,\n click **Troubleshoot** . Or, to view the\n [Troubleshooting SSH errors](/compute/docs/troubleshooting/troubleshooting-ssh-errors)\n documentation, click **Learn more**.\n\nView application logs on a VM\n-----------------------------\n\nTo view the application logs of a VM instance, follow these steps:\n\n1. To view the application logs of a VM instance in Cloud Code,\n right-click the VM instance and select **View Logs**.\n\n The Logs Viewer window appears in your IDE, allowing you to filter by log\n type, time, severity, and instance.\n2. To view logs in real time, turn on the **Streaming** toggle.\n\n3. To view the logging page for a particular VM instance in the Google Cloud console,\n click open_in_new\n **Open in browser**.\n\nUpload a file to a VM\n---------------------\n\nTo copy application files from your local IDE to your remote VM instance, follow\nthese steps:\n| **Note:** Cloud Code only supports [transferring files to Linux\n| VMs](/compute/docs/instances/transfer-files). For additional options for Windows machines, see [Transfer files to Windows VMs](/compute/docs/instances/transfer-files-windows).\n\n1. To upload a file to a VM, in the Cloud Code **Compute Engine**\n explorer, hold the pointer over the VM instance and click\n cloud_upload\n **Upload File via SCP** , or right-click the VM instance and select **Upload\n File via SCP**.\n\n2. Navigate to the file that you want to upload and click **Upload**."]]