# google-cloud-debugger - Module Google::Cloud (v0.42.2)

Reference documentation and code samples for the google-cloud-debugger module Google::Cloud.

## Methods

### .debugger

    def self.debugger(project_id = nil, credentials = nil, service_name: nil, service_version: nil, scope: nil, timeout: nil) -> Google::Cloud::Debugger::Project

Creates a new debugger object for instrumenting Stackdriver Debugger for
an application. Each call creates a new debugger agent with independent
connection service.


<br />

For more information on connecting to Google Cloud see the
[Authentication Guide](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-debugger/latest/AUTHENTICATION "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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-debugger/latest/Google-Cloud-Debugger-Credentials "Google::Cloud::Debugger::Credentials (class)"))
- **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)* ---

  The OAuth 2.0 scopes controlling the
  set of resources and operations that the connection can access. See
  [Using OAuth 2.0 to Access Google
  APIs](https://developers.google.com/identity/protocols/OAuth2).

  The default scope is:
  - `https://www.googleapis.com/auth/cloud_debugger`
  - `https://www.googleapis.com/auth/logging.admin`
- **timeout** (Integer) *(defaults to: nil)* --- Default timeout to use in requests. Optional.
**Returns**

- ([Google::Cloud::Debugger::Project](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-debugger/latest/Google-Cloud-Debugger-Project))
**Example**

```ruby
require "google/cloud"

debugger = Google::Cloud.debugger

debugger.start
```

### #debugger

    def debugger(service_name: nil, service_version: nil, scope: nil, timeout: nil) -> Google::Cloud::Debugger::Project

Creates a new debugger object for instrumenting Stackdriver Debugger for
an application. Each call creates a new debugger agent with independent
connection service.


<br />

For more information on connecting to Google Cloud see the
[Authentication Guide](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-debugger/latest/AUTHENTICATION "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)* ---

  The OAuth 2.0 scopes controlling the
  set of resources and operations that the connection can access. See
  [Using OAuth 2.0 to Access Google
  APIs](https://developers.google.com/identity/protocols/OAuth2).

  The default scope is:
  - `https://www.googleapis.com/auth/cloud_debugger`
  - `https://www.googleapis.com/auth/logging.admin`
- **timeout** (Integer) *(defaults to: nil)* --- Default timeout to use in requests. Optional.
**Returns**

- ([Google::Cloud::Debugger::Project](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-debugger/latest/Google-Cloud-Debugger-Project))
**Examples**

```ruby
require "google/cloud"

gcloud = Google::Cloud.new
debugger = gcloud.debugger

debugger.start
```

The default scope can be overridden with the `scope` option:

```ruby
require "google/cloud"

gcloud  = Google::Cloud.new
platform_scope = "https://www.googleapis.com/auth/cloud-platform"
debugger = gcloud.debugger scope: platform_scope
```