Cloud Debugger V2 API - Class Google::Cloud::Debugger::V2::Debugger::Client (v0.5.0)

Reference documentation and code samples for the Cloud Debugger V2 API class Google::Cloud::Debugger::V2::Debugger::Client.

Client for the Debugger service.

The Debugger service provides the API that allows users to collect run-time information from a running application, without stopping or slowing it down and without modifying its state. An application may include one or more replicated processes performing the same work.

A debugged application is represented using the Debuggee concept. The Debugger service provides a way to query for available debuggees, but does not provide a way to create one. A debuggee is created using the Controller service, usually by running a debugger agent with the application.

The Debugger service enables the client to set one or more Breakpoints on a Debuggee and collect the results of the set Breakpoints.

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the Debugger Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all Debugger clients
::Google::Cloud::Debugger::V2::Debugger::Client.configure do |config|
  config.timeout = 10.0
end

#configure

def configure() { |config| ... } -> Client::Configuration

Configure the Debugger Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#delete_breakpoint

def delete_breakpoint(request, options = nil) -> ::Google::Protobuf::Empty
def delete_breakpoint(debuggee_id: nil, breakpoint_id: nil, client_version: nil) -> ::Google::Protobuf::Empty

Deletes the breakpoint from the debuggee.

Overloads
def delete_breakpoint(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_breakpoint via a request object, either of type Google::Cloud::Debugger::V2::DeleteBreakpointRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Debugger::V2::DeleteBreakpointRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_breakpoint(debuggee_id: nil, breakpoint_id: nil, client_version: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_breakpoint via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • debuggee_id (::String) — Required. ID of the debuggee whose breakpoint to delete.
  • breakpoint_id (::String) — Required. ID of the breakpoint to delete.
  • client_version (::String) — Required. The client version making the call. Schema: domain/type/version (e.g., google.com/intellij/v1).
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/debugger/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Debugger::V2::Debugger::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Debugger::V2::DeleteBreakpointRequest.new

# Call the delete_breakpoint method.
result = client.delete_breakpoint request

# The returned object is of type Google::Protobuf::Empty.
p result

#get_breakpoint

def get_breakpoint(request, options = nil) -> ::Google::Cloud::Debugger::V2::GetBreakpointResponse
def get_breakpoint(debuggee_id: nil, breakpoint_id: nil, client_version: nil) -> ::Google::Cloud::Debugger::V2::GetBreakpointResponse

Gets breakpoint information.

Overloads
def get_breakpoint(request, options = nil) -> ::Google::Cloud::Debugger::V2::GetBreakpointResponse
Pass arguments to get_breakpoint via a request object, either of type GetBreakpointRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Debugger::V2::GetBreakpointRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_breakpoint(debuggee_id: nil, breakpoint_id: nil, client_version: nil) -> ::Google::Cloud::Debugger::V2::GetBreakpointResponse
Pass arguments to get_breakpoint via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • debuggee_id (::String) — Required. ID of the debuggee whose breakpoint to get.
  • breakpoint_id (::String) — Required. ID of the breakpoint to get.
  • client_version (::String) — Required. The client version making the call. Schema: domain/type/version (e.g., google.com/intellij/v1).
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/debugger/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Debugger::V2::Debugger::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Debugger::V2::GetBreakpointRequest.new

# Call the get_breakpoint method.
result = client.get_breakpoint request

# The returned object is of type Google::Cloud::Debugger::V2::GetBreakpointResponse.
p result

#initialize

def initialize() { |config| ... } -> Client

Create a new Debugger client object.

Yields
  • (config) — Configure the Debugger client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::Debugger::V2::Debugger::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Debugger::V2::Debugger::Client.new do |config|
  config.timeout = 10.0
end

#list_breakpoints

def list_breakpoints(request, options = nil) -> ::Google::Cloud::Debugger::V2::ListBreakpointsResponse
def list_breakpoints(debuggee_id: nil, include_all_users: nil, include_inactive: nil, action: nil, strip_results: nil, wait_token: nil, client_version: nil) -> ::Google::Cloud::Debugger::V2::ListBreakpointsResponse

Lists all breakpoints for the debuggee.

Overloads
def list_breakpoints(request, options = nil) -> ::Google::Cloud::Debugger::V2::ListBreakpointsResponse
Pass arguments to list_breakpoints via a request object, either of type ListBreakpointsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Debugger::V2::ListBreakpointsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_breakpoints(debuggee_id: nil, include_all_users: nil, include_inactive: nil, action: nil, strip_results: nil, wait_token: nil, client_version: nil) -> ::Google::Cloud::Debugger::V2::ListBreakpointsResponse
Pass arguments to list_breakpoints via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • debuggee_id (::String) — Required. ID of the debuggee whose breakpoints to list.
  • include_all_users (::Boolean) — When set to true, the response includes the list of breakpoints set by any user. Otherwise, it includes only breakpoints set by the caller.
  • include_inactive (::Boolean) — When set to true, the response includes active and inactive breakpoints. Otherwise, it includes only active breakpoints.
  • action (::Google::Cloud::Debugger::V2::ListBreakpointsRequest::BreakpointActionValue, ::Hash) — When set, the response includes only breakpoints with the specified action.
  • strip_results (::Boolean) — This field is deprecated. The following fields are always stripped out of the result: stack_frames, evaluated_expressions and variable_table.
  • wait_token (::String) — A wait token that, if specified, blocks the call until the breakpoints list has changed, or a server selected timeout has expired. The value should be set from the last response. The error code google.rpc.Code.ABORTED (RPC) is returned on wait timeout, which should be called again with the same wait_token.
  • client_version (::String) — Required. The client version making the call. Schema: domain/type/version (e.g., google.com/intellij/v1).
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/debugger/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Debugger::V2::Debugger::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Debugger::V2::ListBreakpointsRequest.new

# Call the list_breakpoints method.
result = client.list_breakpoints request

# The returned object is of type Google::Cloud::Debugger::V2::ListBreakpointsResponse.
p result

#list_debuggees

def list_debuggees(request, options = nil) -> ::Google::Cloud::Debugger::V2::ListDebuggeesResponse
def list_debuggees(project: nil, include_inactive: nil, client_version: nil) -> ::Google::Cloud::Debugger::V2::ListDebuggeesResponse

Lists all the debuggees that the user has access to.

Overloads
def list_debuggees(request, options = nil) -> ::Google::Cloud::Debugger::V2::ListDebuggeesResponse
Pass arguments to list_debuggees via a request object, either of type ListDebuggeesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Debugger::V2::ListDebuggeesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_debuggees(project: nil, include_inactive: nil, client_version: nil) -> ::Google::Cloud::Debugger::V2::ListDebuggeesResponse
Pass arguments to list_debuggees via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • project (::String) — Required. Project number of a Google Cloud project whose debuggees to list.
  • include_inactive (::Boolean) — When set to true, the result includes all debuggees. Otherwise, the result includes only debuggees that are active.
  • client_version (::String) — Required. The client version making the call. Schema: domain/type/version (e.g., google.com/intellij/v1).
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/debugger/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Debugger::V2::Debugger::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Debugger::V2::ListDebuggeesRequest.new

# Call the list_debuggees method.
result = client.list_debuggees request

# The returned object is of type Google::Cloud::Debugger::V2::ListDebuggeesResponse.
p result

#set_breakpoint

def set_breakpoint(request, options = nil) -> ::Google::Cloud::Debugger::V2::SetBreakpointResponse
def set_breakpoint(debuggee_id: nil, breakpoint: nil, client_version: nil) -> ::Google::Cloud::Debugger::V2::SetBreakpointResponse

Sets the breakpoint to the debuggee.

Overloads
def set_breakpoint(request, options = nil) -> ::Google::Cloud::Debugger::V2::SetBreakpointResponse
Pass arguments to set_breakpoint via a request object, either of type SetBreakpointRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Debugger::V2::SetBreakpointRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def set_breakpoint(debuggee_id: nil, breakpoint: nil, client_version: nil) -> ::Google::Cloud::Debugger::V2::SetBreakpointResponse
Pass arguments to set_breakpoint via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • debuggee_id (::String) — Required. ID of the debuggee where the breakpoint is to be set.
  • breakpoint (::Google::Cloud::Debugger::V2::Breakpoint, ::Hash) — Required. Breakpoint specification to set. The field location of the breakpoint must be set.
  • client_version (::String) — Required. The client version making the call. Schema: domain/type/version (e.g., google.com/intellij/v1).
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/debugger/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Debugger::V2::Debugger::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Debugger::V2::SetBreakpointRequest.new

# Call the set_breakpoint method.
result = client.set_breakpoint request

# The returned object is of type Google::Cloud::Debugger::V2::SetBreakpointResponse.
p result