Project

General

Profile

Misc #11580 ยป 0001-Add-documentation-for-DEBUGGER__.patch

dpulliam (Dylan Pulliam), 10/10/2015 02:34 PM

View differences:

lib/debug.rb
1008 1008
      @stdout.print "\n"
1009 1009
    end
1010 1010

  
1011
    # Prints all threads in @thread_list to @stdout. Returns a sorted array of
1012
    # values from the @thread_list hash.
1013
    #
1014
    # While in the debugger you can list all of
1015
    # the threads with: <b>DEBUGGER__.thread_list_all</b>
1016
    #
1017
    #   (rdb:1) DEBUGGER__.thread_list_all
1018
    #   +1 #<Thread:0x007fb2320c03f0 run> debug_me.rb.rb:3
1019
    #    2 #<Thread:0x007fb23218a538@debug_me.rb.rb:3 sleep>
1020
    #    3 #<Thread:0x007fb23218b0f0@debug_me.rb.rb:3 sleep>
1021
    #   [1, 2, 3]
1022
    #
1023
    # Your current thread is indicated by a <b>+</b>
1024
    #
1025
    # Additionally you can list all threads with <b>th l</b>
1026
    #
1027
    #   (rdb:1) th l
1028
    #    +1 #<Thread:0x007f99328c0410 run>  debug_me.rb:3
1029
    #     2 #<Thread:0x007f9932938230@debug_me.rb:3 sleep> debug_me.rb:3
1030
    #     3 #<Thread:0x007f9932938e10@debug_me.rb:3 sleep> debug_me.rb:3
1031
    #
1032
    # See DEBUGGER__ for more usage.
1033

  
1011 1034
    def thread_list_all
1012 1035
      for th in @thread_list.values.sort
1013 1036
        thread_list(th)
1014
-