Class: Google::Cloud::Debugger::Breakpoint::Evaluator

Inherits:
Object
  • Object
show all
Defined in:
lib/google/cloud/debugger/breakpoint/evaluator.rb

Overview

Helps to evaluate program state at the location of breakpoint during executing. The program state, such as local variables and call stack, are retrieved using Ruby Binding objects.

The breakpoints may consist of conditional expression and other code expressions. The Evaluator helps evaluates these expression in a read-only context. Meaning if the expressions trigger any write operations in middle of the evaluation, the evaluator is able to abort the operation and prevent the program state from being altered.

The evaluated results are saved onto the breakpoints fields. See Stackdriver Breakpoints Doc for details.

Constant Summary collapse

PROHIBITED_OPERATION_MSG =
"Prohibited operation detected".freeze
MUTATION_DETECTED_MSG =
"Mutation detected!".freeze
COMPILATION_FAIL_MSG =
"Unable to compile expression".freeze
LONG_EVAL_MSG =
"Evaluation exceeded time limit".freeze
EVALUATOR_REFERENCE =
:__evaluator__