--------------------------------------------------------
The Cloud Code extension for VS Code is a powerful tool that enables swift app development with Google Cloud integration. Before you start, make sure you have the necessary tools installed and set up on your system.
Prerequisites
Before installing Cloud Code, confirm that you have:
- Visual Studio Code (VS Code) installed and configured
- Language support installed for Swift or other programming languages of your choice
- Git installed and set up on your machine
- Docker client installed and added to the PATH environment variable (optional)
- A Google Cloud project created and billing enabled (if using Google Cloud)
Installing Cloud Code
To install Cloud Code, follow these steps:
- Open the Extensions view in VS Code by clicking Extensions or pressing Ctrl/Cmd + Shift + X
- Search for "Google Cloud Code" in the Marketplace
- Click Install to download and install the extension
- If prompted, restart VS Code
Once installed, you'll see the Cloud Code icon added to your activity bar, ready for use.
Customizing Your Cloud Code Installation
By default, Cloud Code has Auto dependencies turned on. To customize your installation:
- Go to Code > Settings > Extensions and search for "Gemini Code Assist + Google Cloud Code"
- Set Auto Dependencies (cloudcode.autoDependencies) to off
- Install the required command-line dependencies manually
Verifying Cloud Code vsix using VsixSignTool
To verify the integrity of your Cloud Code installation:
- Install Nuget package manager and ensure you're on a production release of Cloud Code
- Download the packaged version of Cloud Code from the Marketplace (Resources > Download Extension)
- Run the following command in a terminal window:
`
PATH_TO_VSIXSIGNTOOL verify PATH_TO_DOWNLOADED_VSIX
`
Verify that the output matches: "VsixSignTool Success: Package PATH_TO_DOWNLOADED_VSIX is valid."
Authenticating Credentials for Google Cloud
To help with application development using Google Cloud APIs:
- Sign in to your Google Cloud account through the Cloud Code status bar
- Confirm your Application Default Credentials are updated
Known Issue: Edge Browser Redirects
When using Microsoft Edge browser, you may encounter a known issue where the URL http://localhost:3000 is redirected to https://localhost:3000. To resolve this:
- Open the Edge browser and navigate to edge://net-internals/#hsts
- Delete domain security policies for localhost
Signing Out of Google Cloud
To sign out of your Google Cloud account:
- Click Help and Feedback in the Cloud Code status bar
- Select Sign-out
- Alternatively, use the Command Palette: Press Ctrl/Cmd + Shift + P or click View > Command Palette, then select Sign out of all accounts in Google Cloud SDK
Changing the Active Google Cloud Project
To switch between Google Cloud projects:
- Click the active project name in the Cloud Code status bar
- Select "Switch Project" from the Quick Pick menu that appears
- Search for and select a new project or enter keywords to filter results
Authenticating Credentials for Debugging Applications Locally
To authenticate your credentials for debugging applications locally:
- Sign in to your Google Cloud account through the Cloud Code status bar (as above)
- Confirm your Application Default Credentials are updated
- If you encounter an error message when running/debugging a local application, follow the same sign-in steps as above