Creates a new debugger object for instrumenting Stackdriver Debugger for
an application. Each call creates a new debugger agent with independent
connection service.
For more information on connecting to Google Cloud see the
Authentication Guide.
Parameters
project_id (String) — Project identifier for the Stackdriver Debugger
service you are connecting to. If not present, the default project for
the credentials is used.
credentials (String, Hash, Google::Auth::Credentials) — The path to
the keyfile as a String, the contents of the keyfile as a Hash, or a
Google::Auth::Credentials object. (See Debugger::Credentials)
service_name (String) (defaults to: nil) — Name for the debuggee application. Optional.
service_version (String) (defaults to: nil) — Version identifier for the debuggee
scope (String, Array<String>) (defaults to: nil) —
Creates a new debugger object for instrumenting Stackdriver Debugger for
an application. Each call creates a new debugger agent with independent
connection service.
For more information on connecting to Google Cloud see the
Authentication Guide.
Parameters
service_name (String) (defaults to: nil) — Name for the debuggee application. Optional.
service_version (String) (defaults to: nil) — Version identifier for the debuggee
application. Optional.
scope (String, Array<String>) (defaults to: nil) —
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# google-cloud-debugger - Module Google::Cloud (v0.42.2)\n\nReference documentation and code samples for the google-cloud-debugger module Google::Cloud.\n\nMethods\n-------\n\n### .debugger\n\n def self.debugger(project_id = nil, credentials = nil, service_name: nil, service_version: nil, scope: nil, timeout: nil) -\u003e Google::Cloud::Debugger::Project\n\nCreates a new debugger object for instrumenting Stackdriver Debugger for\nan application. Each call creates a new debugger agent with independent\nconnection service.\n\n\n\u003cbr /\u003e\n\nFor more information on connecting to Google Cloud see the\n[Authentication Guide](./AUTHENTICATION \"Authentication Guide\"). \n**Parameters**\n\n- **project_id** (String) --- Project identifier for the Stackdriver Debugger service you are connecting to. If not present, the default project for the credentials is used.\n- **credentials** (String, Hash, Google::Auth::Credentials) --- The path to the keyfile as a String, the contents of the keyfile as a Hash, or a Google::Auth::Credentials object. (See [Debugger::Credentials](/ruby/docs/reference/google-cloud-debugger/latest/Google-Cloud-Debugger-Credentials \"Google::Cloud::Debugger::Credentials (class)\"))\n- **service_name** (String) *(defaults to: nil)* --- Name for the debuggee application. Optional.\n- **service_version** (String) *(defaults to: nil)* --- Version identifier for the debuggee\n- **scope** (String, Array\\\u003cString\\\u003e) *(defaults to: nil)* ---\n\n The OAuth 2.0 scopes controlling the\n set of resources and operations that the connection can access. See\n [Using OAuth 2.0 to Access Google\n APIs](https://developers.google.com/identity/protocols/OAuth2).\n\n The default scope is:\n - `https://www.googleapis.com/auth/cloud_debugger`\n - `https://www.googleapis.com/auth/logging.admin`\n- **timeout** (Integer) *(defaults to: nil)* --- Default timeout to use in requests. Optional. \n**Returns**\n\n- ([Google::Cloud::Debugger::Project](./Google-Cloud-Debugger-Project))\n**Example** \n\n```ruby\nrequire \"google/cloud\"\n\ndebugger = Google::Cloud.debugger\n\ndebugger.start\n```\n\n### #debugger\n\n def debugger(service_name: nil, service_version: nil, scope: nil, timeout: nil) -\u003e Google::Cloud::Debugger::Project\n\nCreates a new debugger object for instrumenting Stackdriver Debugger for\nan application. Each call creates a new debugger agent with independent\nconnection service.\n\n\n\u003cbr /\u003e\n\nFor more information on connecting to Google Cloud see the\n[Authentication Guide](./AUTHENTICATION \"Authentication Guide\"). \n**Parameters**\n\n- **service_name** (String) *(defaults to: nil)* --- Name for the debuggee application. Optional.\n- **service_version** (String) *(defaults to: nil)* --- Version identifier for the debuggee application. Optional.\n- **scope** (String, Array\\\u003cString\\\u003e) *(defaults to: nil)* ---\n\n The OAuth 2.0 scopes controlling the\n set of resources and operations that the connection can access. See\n [Using OAuth 2.0 to Access Google\n APIs](https://developers.google.com/identity/protocols/OAuth2).\n\n The default scope is:\n - `https://www.googleapis.com/auth/cloud_debugger`\n - `https://www.googleapis.com/auth/logging.admin`\n- **timeout** (Integer) *(defaults to: nil)* --- Default timeout to use in requests. Optional. \n**Returns**\n\n- ([Google::Cloud::Debugger::Project](./Google-Cloud-Debugger-Project))\n**Examples** \n\n```ruby\nrequire \"google/cloud\"\n\ngcloud = Google::Cloud.new\ndebugger = gcloud.debugger\n\ndebugger.start\n```\n\nThe default scope can be overridden with the `scope` option: \n\n```ruby\nrequire \"google/cloud\"\n\ngcloud = Google::Cloud.new\nplatform_scope = \"https://www.googleapis.com/auth/cloud-platform\"\ndebugger = gcloud.debugger scope: platform_scope\n```"]]