This topic describes how to use Cloud Debugger to inspect code stored in Cloud Source Repositories and deployed to App Engine. Using Debugger, you can inspect the state of an app in real time, without stopping or slowing it down.
Before you begin
Complete the steps from Quickstart: Create a repository. After you complete that quickstart, you have an app you can deploy to App Engine.
Deploy your app
In a terminal window, go to the root of your repository:
cd hello-world
Deploy your app:
gcloud app deploy --version=v1
Open your app:
gcloud app browse
The browser displays the message
Hello, World!
.
View deployed sources
After you deploy your app, view its sources in the Google Cloud Console.
In the GCP Console, go to the Stackdriver Debug page.
Select your Google Cloud project.
In the toolbar, select default.
This setting indicates which service or version of your app that you're debugging.
Select Deployed Files.
A panel displays the source files for the Python app you just deployed. In the list of deployed files, you can click
main.py
to view its contents.
From this point you can use Debugger to take snapshots or set logpoints.
Clean up
To avoid incurring charges to your Google Cloud account for the resources used in this quickstart, follow these steps.
In the GCP Console, open the All repositories page for Cloud Source Repositories.
Hold the pointer over the repository you want to delete and click Settings settings.
The General settings page opens.
Click Delete this repository delete.
The Remove repository dialog opens.
Type the name of the repository you want to delete.
Click Delete.
What's next
- Learn more about Debugger.