class DEBUGGER__::ThreadClient

def initialize id, q_evt, q_cmd, thr = Thread.current

def initialize id, q_evt, q_cmd, thr = Thread.current
  @is_management = false
  @id = id
  @thread = thr
  @target_frames = nil
  @q_evt = q_evt
  @q_cmd = q_cmd
  @step_tp = nil
  @output = []
  @frame_formatter = method(:default_frame_formatter)
  @var_map = {} # { thread_local_var_id => obj } for DAP
  @obj_map = {} # { object_id => obj } for CDP
  @recorder = nil
  @mode = :waiting
  @current_frame_index = 0
  # every thread should maintain its own CheckBreakpoint fulfillment state
  @check_bp_fulfillment_map = {} # { check_bp => boolean }
  set_mode :running
  thr.instance_variable_set(:@__thread_client_id, id)
  ::DEBUGGER__.info("Thread \##{@id} is created.")
end