Method: DEBUGGER__::ThreadClient#show_outline

Defined in:
lib/debug/thread_client.rb

#show_outline(expr) ⇒ Object

cmd: show outline



763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
# File 'lib/debug/thread_client.rb', line 763

def show_outline expr
  begin
    obj = frame_eval(expr, re_raise: true)
  rescue Exception
    # ignore
  else
    o = Output.new(@output)

    locals = current_frame&.local_variables

    klass = M_CLASS.bind_call(obj)
    klass = obj if Class == klass || Module == klass

    o.dump("constants", obj.constants) if M_RESPOND_TO_P.bind_call(obj, :constants)
    outline_method(o, klass, obj)
    o.dump("instance variables", M_INSTANCE_VARIABLES.bind_call(obj))
    o.dump("class variables", klass.class_variables)
    o.dump("locals", locals.keys) if locals
  end
end