Quickstart: Integrate Debugger with Cloud Source Repositories

This topic describes how to use Stackdriver 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

  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 Platform Console.

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

    Go to the Stackdriver Debug page

  2. Select your Google Cloud Platform (GCP) 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 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 GCP account for the resources used in this quickstart, 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

Trang này có hữu ích không? Hãy cho chúng tôi biết đánh giá của bạn:

Gửi phản hồi về...

Cloud Source Repositories Documentation