class DEBUGGER__::Session
def initialize
def initialize @ui = nil @sr = SourceRepository.new @bps = {} # bp.key => bp # [file, line] => LineBreakpoint # "Error" => CatchBreakpoint # "Foo#bar" => MethodBreakpoint # [:watch, ivar] => WatchIVarBreakpoint # [:check, expr] => CheckBreakpoint # @tracers = {} @th_clients = {} # {Thread => ThreadClient} @q_evt = Queue.new @displays = [] @tc = nil @tc_id = 0 @preset_command = nil @postmortem_hook = nil @postmortem = false @intercept_trap_sigint = false @intercepted_sigint_cmd = 'DEFAULT' @process_group = ProcessGroup.new @subsession_stack = [] @subsession_id = 0 @frame_map = {} # for DAP: {id => [threadId, frame_depth]} and CDP: {id => frame_depth} @var_map = {1 => [:globals], } # {id => ...} for DAP @src_map = {} # {id => src} @scr_id_map = {} # for CDP @obj_map = {} # { object_id => ... } for CDP @tp_thread_begin = nil @tp_thread_end = nil @commands = {} @unsafe_context = false @has_keep_script_lines = RubyVM.respond_to? :keep_script_lines @tp_load_script = TracePoint.new(:script_compiled){|tp| eval_script = tp.eval_script unless @has_keep_script_lines ThreadClient.current.on_load tp.instruction_sequence, eval_script } @tp_load_script.enable @thread_stopper = thread_stopper self.postmortem = CONFIG[:postmortem] register_default_command end