Quickstart for Integrating Cloud 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 Google Cloud Platform account for the resources used in this quickstart:

To delete the repository you created:

  1. Open the source view in the console:

    Open the Source View in the Console

  2. Click the More button More button next to the repository you want to delete.

    Create Repository button

  3. Select Delete.

  4. When prompted for the repository name, enter hello-world and then click Delete.

What's next

Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Source Repositories