With Cloud Code's Compute Engine integration, you canview the Compute Engine VMs running your applications, establishconnections to your VMs using SSH, view application logs, and upload files to aVM.
This document shows you how to access Compute Engine withCloud Code in your IDE and manage your VM instances.
View VMs
To view VMs in your Google Cloud project and the VM instance details inthe Google Cloud console, follow these steps:
In your IDE, sign into Cloud Code if you haven't already, andselect your Google Cloud project.
To view VM instances in your Google Cloud project, in the activity barof your IDE, click Cloud Code and then expand theCompute Engine explorer.
To view the VM instance details in the Google Cloud console, right-click theVM instance and select Open in Cloud Console.
Connect to a VM
To connect to the VM instance in your IDE with Cloud Code using thebuilt-in IDE terminal and SSH, follow these steps:
To connect to a VM instance, in the Compute Engine explorer, hold thepointer over the VM instance and clickterminal Open SSH or right-clickthe VM instance and select Open 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 theterminal, an error message dialog appears. To viewinformation in the terminal about the issue and potential resolutions,click Troubleshoot. Or, to view theTroubleshooting SSH errorsdocumentation, click Learn 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 select View Logs.
The Logs Viewer window appears in your IDE, allowing you to filter by logtype, time, severity, and instance.
To view logs in real time, turn on the Streaming toggle.
To view the logging page for a particular VM instance in the Google Cloud console,click open_in_newOpen in browser.
Upload a file to a VM
To copy application files from your local IDE to your remote VM instance, followthese steps:
To upload a file to a VM, in the Cloud Code Compute Engineexplorer, hold the pointer over the VM instance and clickcloud_uploadUpload File via SCP, or right-click the VM instance and select UploadFile via SCP.
Navigate to the file that you want to upload and click Upload.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-10 UTC.
[{ "type": "thumb-down", "id": "hardToUnderstand", "label":"Hard to understand" },{ "type": "thumb-down", "id": "incorrectInformationOrSampleCode", "label":"Incorrect information or sample code" },{ "type": "thumb-down", "id": "missingTheInformationSamplesINeed", "label":"Missing the information/samples I need" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }] [{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]