class Byebug::ThreadCommand::ListCommand

Information about threads

Public Class Methods

description() click to toggle source
# File lib/byebug/commands/thread/list.rb, line 19
      def self.description
        <<-DESCRIPTION
          th[read] l[ist] <thnum>

          #{short_description}
        DESCRIPTION
      end
regexp() click to toggle source
# File lib/byebug/commands/thread/list.rb, line 15
def self.regexp
  /^\s* l(?:ist)? \s*$/x
end
short_description() click to toggle source
# File lib/byebug/commands/thread/list.rb, line 27
def self.short_description
  "Lists all threads"
end

Public Instance Methods

execute() click to toggle source
# File lib/byebug/commands/thread/list.rb, line 31
def execute
  contexts = Byebug.contexts.sort_by(&:thnum)

  thread_list = prc("thread.context", contexts) do |context, _|
    thread_arguments(context)
  end

  print(thread_list)
end