Quickstart for integrating Stackdriver 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 Stackdriver Debugger, you can inspect the state of an application in real time, without stopping or slowing it down.

Before you begin

Complete the steps from Quickstart Creating a Repository.

After you complete this quickstart, you will have an application you can deploy to App Engine.

Deploy your application

  1. From a terminal window, navigate to the root of your repository.

    cd hello-world
  2. Deploy your application.

    gcloud app deploy --version=v1
  3. Open your application.

    gcloud app browse

The browser window reads:

Hello world!

View Deployed Sources

After you deploy your application, you can view its sources on the Google Cloud Platform Console Debug page.

  1. Navigate to the Debug page in the Google Cloud Platform Console.

  2. Make sure you have the correct project selected.

  3. Make sure default is selected in the menu at the top. This indicates which service/version of your app you will be debugging.

  4. Make sure Deployed Files is selected in the menu at the left. This panel displays the source code of the Python app you just deployed.

  5. Select main.py from the list of deployed files to see its contents.

From this point, you can now use Stackdriver Debugger to take snapshots or set logpoints.

Clean up

To avoid incurring charges to your GCP account for the resources used in this quickstart:

To delete the repository you created:

  1. Open the All Repositories view for Cloud Source Repositories:

    Open Cloud Source Repositories

  2. Hover over the repository and click the Gear button.

    The General Settings screen opens.

  3. Click Delete This Repository.

    The Remove Repository screen opens.

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

  5. Click Delete.

What's next

Bu sayfayı yararlı buldunuz mu? Lütfen görüşünüzü bildirin:

Şunun hakkında geri bildirim gönderin...

Cloud Source Repositories Documentation