Stay organized with collections Save and categorize content based on your preferences.

Inspect code stored in Cloud Source Repositories

This page shows you how to use Cloud Debugger to inspect code stored in Cloud Source Repositories and deployed to App Engine. By 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 Create a code repository in Cloud Source Repositories. After you complete that quickstart, you have an app you can deploy to App Engine.

Deploy your app

  1. In a terminal window, go to the root of your repository:

    cd hello-world
  2. Deploy your app:

    gcloud app deploy --version=v1
  3. 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.

  1. In the GCP Console, go to the Stackdriver Debug page.

    Go to the Stackdriver Debug page

  2. Select your Google Cloud project.

  3. In the toolbar, select default.

    This setting indicates which service or version of your app that you're debugging.

  4. 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 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 on this page, follow these steps.

  1. In the GCP Console, open the All repositories page for Cloud Source Repositories.

    Open Cloud Source Repositories

  2. Hold the pointer over the repository you want to delete and click Settings .

    The General settings page opens.

  3. Click Delete this repository .

    The Remove repository dialog opens.

  4. Type the name of the repository you want to delete.

  5. Click Delete.

What's next