An idiomatic C++ client library for theStackdriver Debugger API, a service to examine the call stack and variables of a running application without stopping or slowing it down.
While this library isGA, please note Google Cloud C++ client libraries donotfollowSemantic Versioning.
Quickstart
The following shows the code that you'll run in thegoogle/cloud/debugger/quickstart/directory, which should give you a taste of the Stackdriver Debugger API C++ client library API.
This library offers multiple*Clientclasses, which are listed below. Each one of these classes exposes all the RPCs for a gRPCserviceas member functions of the class. This library groups multiple gRPC services because they are part of the same product or are often used together. A typical example may be the administrative and data plane operations for a single product.
The library also has other classes that provide helpers, configuration parameters, and infrastructure to mock the*Clientclasses when testing your application.
The library automatically retries requests that fail with transient errors, and usesexponential backoffto backoff between retries. Application developers can override the default policies.
More Information
Error Handling- describes how the library reports errors.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThis C++ client library provides an interface for the Stackdriver Debugger API, enabling users to inspect application call stacks and variables without halting execution.\u003c/p\u003e\n"],["\u003cp\u003eThe library, while generally available (GA), does not adhere to Semantic Versioning practices.\u003c/p\u003e\n"],["\u003cp\u003eThe library features \u003ccode\u003e*Client\u003c/code\u003e classes, such as \u003ccode\u003eController2Client\u003c/code\u003e and \u003ccode\u003eDebugger2Client\u003c/code\u003e, which offer gRPC service operations, helper functionalities, and mock objects for testing.\u003c/p\u003e\n"],["\u003cp\u003eIt includes built-in retry mechanisms with exponential backoff for transient errors, with the option for developers to customize these policies.\u003c/p\u003e\n"],["\u003cp\u003eThe library's behavior can be configured using environment variables, and it allows overriding the default endpoint and authentication credentials.\u003c/p\u003e\n"]]],[],null,["Version latestkeyboard_arrow_down\n\n- [2.12.0-rc (latest)](/cpp/docs/reference/debugger/latest)\n- [2.11.0](/cpp/docs/reference/debugger/2.11.0) \n\nStackdriver Debugger API C++ Client Library\n===========================================\n\nAn idiomatic C++ client library for the [Stackdriver Debugger API](https://cloud.google.com/debugger), a service to examine the call stack and variables of a running application without stopping or slowing it down.\n\nWhile this library is **GA** , please note Google Cloud C++ client libraries do **not** follow [Semantic Versioning](https://semver.org/).\n\n### Quickstart\n\nThe following shows the code that you'll run in the `google/cloud/debugger/quickstart/` directory, which should give you a taste of the Stackdriver Debugger API C++ client library API. \n\n #include \"google/cloud/debugger/v2/debugger2_client.h\"\n #include \u003ciostream\u003e\n\n int main(int argc, char* argv[]) try {\n if (argc != 2) {\n std::cerr \u003c\u003c \"Usage: \" \u003c\u003c argv[0] \u003c\u003c \" project-id\\n\";\n return 1;\n }\n\n namespace debugger = ::google::cloud::debugger_v2;\n auto client = debugger::Debugger2Client(debugger::MakeDebugger2Connection());\n auto response = client.ListDebuggees(argv[1], \"quickstart\");\n if (!response) throw std::move(response).status();\n std::cout \u003c\u003c response-\u003eDebugString() \u003c\u003c \"\\n\";\n\n return 0;\n } catch (google::cloud::Status const& status) {\n std::cerr \u003c\u003c \"google::cloud::Status thrown: \" \u003c\u003c status \u003c\u003c \"\\n\";\n return 1;\n }\n\n### Main classes\n\nThis library offers multiple `*Client` classes, which are listed below. Each one of these classes exposes all the RPCs for a gRPC `service` as member functions of the class. This library groups multiple gRPC services because they are part of the same product or are often used together. A typical example may be the administrative and data plane operations for a single product.\n\nThe library also has other classes that provide helpers, configuration parameters, and infrastructure to mock the `*Client` classes when testing your application.\n\n- [`debugger_v2::Controller2Client`](/cpp/docs/reference/debugger/latest/classgoogle_1_1cloud_1_1debugger__v2_1_1Controller2Client)\n- [`debugger_v2::Debugger2Client`](/cpp/docs/reference/debugger/latest/classgoogle_1_1cloud_1_1debugger__v2_1_1Debugger2Client)\n\n### Retry, Backoff, and Idempotency Policies.\n\nThe library automatically retries requests that fail with transient errors, and uses [exponential backoff](https://en.wikipedia.org/wiki/Exponential_backoff) to backoff between retries. Application developers can override the default policies.\n\n### More Information\n\n- [Error Handling](https://cloud.google.com/cpp/docs/reference/common/latest/common-error-handling.html) - describes how the library reports errors.\n- [How to Override the Default Endpoint](/cpp/docs/reference/debugger/latest/debugger-override-endpoint) - describes how to override the default endpoint.\n- [How to Override the Authentication Credentials](/cpp/docs/reference/debugger/latest/debugger-override-authentication) - describes how to change the authentication credentials used by the library.\n- [Environment Variables](/cpp/docs/reference/debugger/latest/debugger-env) - describes environment variables that can configure the behavior of the library."]]