Stay organized with collections Save and categorize content based on your preferences.
Before you deploy a service to Cloud Run, you can develop it locally using a Cloud Run emulator.
Configuring your service for developmentIf you don't have a .vscode/launch.json
file defined, the Run/Debug on Cloud Run Emulator dialog lets you configure your launch and then saves your settings to .vscode/launch.json
. If you have a .vscode/launch.json
file configured, you can edit the file directly.
To run your service locally, specify your configuration:
Ctrl
/Cmd
+Shift
+P
or click View > Command Palette) and then run the Run on Cloud Run Emulator command.In the Run/Debug on Cloud Run Emulator dialog, set the specifications for your configuration:
After you define your preferred settings, run your service by clicking Run.
If prompted, authenticate your credentials to run and debug an application locally.
Monitor the status of your deployment in the output window.
After deployment is complete, you can view your running service by opening the URL displayed in the output window.
To view verbose logs, switch to the detailed Cloud Run view in the output window.
After your session completes, right-click to use the following commands:
If you've turned off watch mode in your launch configuration and you want to make changes to your application and rebuild and redeploy the application, click the Cloud Code status bar and then click Turn on watch mode.
To stop your deployment, you can click the Stop button in the action bar for your current deployment.
If your code includes potentially sensitive data like API keys, passwords, and certificates, storing them as secrets can help secure them. The Cloud Code Secret Manager integration lets you securely store these secrets and fetch them programmatically. For a detailed look at how you can create and manage secrets with Cloud Code, see the Secret Manager guide.
Customizing an existing launch.json configurationThe Cloud Code plugin updates the launch.json
configuration file automatically when you choose a run action. To further customize how your service is run, you can specify the following fields in your .vscode/launch.json
file:
watch: Watches for changes in the workspace and reruns the service. True by default.
The following sample shows watch set to true
:
"watch": true,
build: Specify the builder (Docker, jibMaven, jibGradle, or buildpacks) to build your images with.
The following sample shows a Docker builder:
"build": {
"docker": {
"path": "Dockerfile"
}
},
The following sample shows a buildpack builder:
"build": {
"buildpacks": {
"path": "src/requirements.txt",
"builder": "gcr.io/buildpacks/builder:v1"
}
},
image: Specify the name of the image to use.
The following sample shows how to specify an image name:
"image": "hello-world",
service: Specify the Cloud Run service to use.
The following sample shows how to specify a service name, port, and resource limits:
"service": {
"name": "hello-world",
"containerPort": 8080,
"resources": {
"limits": {
"memory": "256Mi"
}
}
},
debug: Specify debug settings such as remote path mapping to map a local path to a path on the remote container.
The following sample shows a debug section that indicates the source files' location:
"debug": {
"sourceFileMap": {
"${workspaceFolder}": "/app"
}
}
To send feedback, report issues on
GitHub, or ask a question on
Stack Overflow.
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 2025-08-07 UTC.
[[["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-08-07 UTC."],[[["You can develop services locally using a Cloud Run emulator before deploying them to Cloud Run, with configuration settings being stored in a `.vscode/launch.json` file."],["The Run/Debug on Cloud Run Emulator dialog or the command palette can be used to configure your service, allowing you to choose between Docker or Buildpacks, specify environment variables, and set Cloud SQL connections."],["Once configured, you can run your service locally, monitor its deployment status in the output window, and view logs or access the service URL."],["Secrets like API keys can be securely managed using the Cloud Code Secret Manager integration, with details available in the Secret Manager guide."],["You can customize your service's launch settings further by editing the `.vscode/launch.json` file, which allows for configuring options such as watching for changes, specifying the builder, setting the image and service, and defining debug settings."]]],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4