Debugging overview

If you store your app's code in Cloud Source Repositories, you can use the source console to perform Stackdriver Debugger tasks. These include taking and viewing debug snapshots, adding logpoints, and viewing logpoint outputs.

The debugging functionality in Cloud Source Repositories is an alternative to the functionality provided by Debugger in the Google Cloud Platform Console. For more information about setting up Debugger and using the GCP Console interface, see the Debugger documentation.

Supported code locations

You can use the debugging functionality in the source console if your code is located in one of the following products or technologies:

If your source code is located in a non-mirrored repository hosted on a service like GitHub or Bitbucket, or you're debugging from local files, you must perform debugging tasks in the GCP Console instead.

Setting up debugging

Before you debug your app in Cloud Source Repositories, you need to perform the following steps:

  • Enable Debugger for your Google Cloud Platform (GCP) project and configure your environment and your app. These steps vary by language or framework used to implement the app.

  • Deploy and/or start your app.

Debugging in Cloud Source Repositories

Debugging functionality becomes usable after you set up Debugger to work with your project and app. When you view the contents of the repository, debugging tabs appear in one of the GCP Console panes.

Debugging tabs in the source console

Debugging tasks

You can do the following in Cloud Source Repositories:

  • Take debug snapshots, which lets you view the state of local variables and the call stack in your app at specific points in your code.

  • Add logpoints to your code, which lets you inject logging into a running service without restarting it or interfering with its normal function.

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