def __init__(self, definition, data_visibility_policy):
    """Class constructor.

    Args:
      definition: breakpoint definition that this class will augment with
          captured data.
      data_visibility_policy: An object used to determine the visibiliy
          of a captured variable.  May be None if no policy is available.
    """
    self.data_visibility_policy = data_visibility_policy

    self.breakpoint = copy.deepcopy(definition)

    self.breakpoint['stackFrames'] = []
    self.breakpoint['evaluatedExpressions'] = []
    self.breakpoint['variableTable'] = [{
        'status': {
            'isError': True,
            'refersTo': 'VARIABLE_VALUE',
            'description': {
                'format': 'Buffer full. Use an expression to see more data'
            }
        }
    }]

    # Shortcut to variables table in the breakpoint message.
    self._var_table = self.breakpoint['variableTable']

    # Maps object ID to its index in variables table.
    self._var_table_index = {}

    # Total size of data collected so far. Limited by max_size.
    self._total_size = 0

    # Maximum number of stack frame to capture. The limit is aimed to reduce
    # the overall collection time.
    self.max_frames = 20

    # Only collect locals and arguments on the few top frames. For the rest of
    # the frames we only collect the source location.
    self.max_expand_frames = 5

    # Maximum amount of data to capture. The application will usually have a
    # lot of objects and we need to stop somewhere to keep the delay
    # reasonable.
    # This constant only counts the collected payload. Overhead due to key
    # names is not counted.
    self.max_size = 32768  # 32 KB

    self.default_capture_limits = _CaptureLimits()

    # When the user provides an expression, they've indicated that they're
    # interested in some specific data. Use higher per-object capture limits
    # for expressions. We don't want to globally increase capture limits,
    # because in the case where the user has not indicated a preference, we
    # don't want a single large object on the stack to use the entire max_size
    # quota and hide the rest of the data.
    self.expression_capture_limits = _CaptureLimits(max_value_len=32768,
                                                    max_list_items=32768)
def __init__ ( self , definition , data_visibility_policy ) : self . data_visibility_policy = data_visibility_policy self . breakpoint = copy . deepcopy ( definition ) self . breakpoint [ 'stackFrames' ] = [ ] self . breakpoint [ 'evaluatedExpressions' ] = [ ] self . breakpoint [ 'variableTable' ] = [ { 'status' : { 'isError' : True , 'refersTo' : 'VARIABLE_VALUE' , 'description' : { 'format' : 'Buffer full. Use an expression to see more data' } } } ] self . _var_table = self . breakpoint [ 'variableTable' ] self . _var_table_index = { } self . _total_size = 0 self . max_frames = 20 self . max_expand_frames = 5 self . max_size = 32768 self . default_capture_limits = _CaptureLimits ( ) self . expression_capture_limits = _CaptureLimits ( max_value_len = 32768 , max_list_items = 32768 )
Class constructor.

    Args:
      definition: breakpoint definition that this class will augment with
          captured data.
      data_visibility_policy: An object used to determine the visibiliy
          of a captured variable.  May be None if no policy is available.