Debugging overview

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

If you store your app's code in Cloud Source Repositories, you can use the source console to perform Cloud 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 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 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