# google-cloud-debugger - Class Google::Cloud::Debugger::Tracer (v0.42.2)

Reference documentation and code samples for the google-cloud-debugger class Google::Cloud::Debugger::Tracer.

## Tracer

When active breakpoints are set for the debugger, the tracer monitors
the running Ruby application and triggers evaluation when the code is
executed at the breakpoint locations.

The tracer tracks the running application using several Ruby TracePoints
and C level Ruby debugging API.

## Inherits

- Object

## Methods

### #agent

    def agent() -> Google::Cloud::Debugger::Agent

The debugger agent this tracer belongs to
**Returns**

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

### #breakpoints_hit

    def breakpoints_hit(breakpoints, call_stack_bindings)

Callback function when a set of breakpoints are hit. Handover the hit
breakpoint to breakpoint_manager to be evaluated.

### #start

    def start()

Get the sync the breakpoints cache with BreakpointManager. Start
tracing and monitoring if there are any breakpoints.

### #stop

    def stop()

Stops all tracing.

### #update_breakpoints_cache

    def update_breakpoints_cache()

Update tracer's private breakpoints cache with the list of active
breakpoints from BreakpointManager.


<br />

This methood is atomic for thread safety purpose.