Manage VMs in Cloud Code for VS Code

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 page shows you how to access Compute Engine with Cloud Code and manage your VM instances.

Viewing VMs

To view VMs in your Google Cloud project and view instance details page in Google Cloud console from Cloud Code, follow these steps:

  1. Connect to your Google Cloud project.

  2. To view VM instances in your Google Cloud project, click Cloud Code and then expand the Compute Engine section.

  3. To view the VM instance details in Google Cloud console, right-click the VM instance and select Open in Cloud Console.

Connecting to a VM

To connect to the VM instance in Cloud Code using the built-in IDE terminal and SSH, follow these steps:

  1. To connect to a VM instance, hold the pointer over the VM instance and click the Open SSH icon or right-click the VM instance and select Open SSH.

    A terminal appears, displaying information about the remote instance.

  2. If the connection to the VM instance fails:

    • For Windows users, see Troubleshooting SSH for common errors that you may run into when connecting to a VM using SSH, ways to resolve errors, and methods for diagnosing failed SSH connections.

    • For Mac users, an error message dialog appears. Click Troubleshoot to view information in the terminal about the issue and potential resolutions, or click Learn more to view Troubleshooting SSH documentation.

Viewing application logs on a VM

To view the application logs of a VM instance, follow these steps:

  1. To view the application logs of a VM instance in Cloud Code, right-click the VM instance and select View logs.

    The Logs Viewer window appears, allowing you to filter through log types, time, severity, and instances.

  2. To view logs in real time, toggle Streaming to the "on" position.

  3. To view more logging information in Google Cloud console, click open_in_new Open in browser. This takes you to Google Cloud console's logging page for a particular VM instance.

Uploading a file to a VM

To copy application files from your local IDE to your remote VM instance, follow these steps:

  1. To upload a file to a VM, hold the pointer over the VM instance and select cloud_upload Upload File via SCP, or right-click the VM instance and select Upload File via SCP.

  2. Navigate to the file that you want to upload and click Upload.

Get Support

To send feedback, report issues on GitHub, or ask a question on Stack Overflow.