Sha256: 4f16279a50ce0cb7ffbe520317e04f3ea1bd1e4d0acb8dcebaf1b13a3ce7c5cb

Contents?: true

Size: 777 Bytes

Versions: 26

Compression:

Stored size: 777 Bytes

Contents

require 'byebug/helpers/thread'

module Byebug
  #
  # Reopens the +thread+ command to define the +list+ subcommand
  #
  class ThreadCommand < Command
    #
    # Information about threads
    #
    class ListCommand < Command
      include Helpers::ThreadHelper

      def self.regexp
        /^\s* l(?:ist)? \s*$/x
      end

      def self.description
        <<-EOD
          th[read] l[ist] <thnum>

          #{short_description}
        EOD
      end

      def self.short_description
        'Lists all threads'
      end

      def execute
        contexts = Byebug.contexts.sort_by(&:thnum)

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

        print(thread_list)
      end
    end
  end
end

Version data entries

26 entries across 25 versions & 3 rubygems

Version Path
dirwatch-0.0.2 vendor/bundle/ruby/2.3.0/gems/byebug-9.1.0/lib/byebug/commands/thread/list.rb
tdiary-5.0.6 vendor/bundle/gems/byebug-9.1.0/lib/byebug/commands/thread/list.rb
byebug-9.1.0 lib/byebug/commands/thread/list.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/byebug-9.0.6/lib/byebug/commands/thread/list.rb
tdiary-5.0.5 vendor/bundle/gems/byebug-9.0.6/lib/byebug/commands/thread/list.rb
tdiary-5.0.4 vendor/bundle/gems/byebug-9.0.6/lib/byebug/commands/thread/list.rb
byebug-9.0.6 lib/byebug/commands/thread/list.rb
byebug-9.0.5 lib/byebug/commands/thread/list.rb
byebug-9.0.4 lib/byebug/commands/thread/list.rb
byebug-9.0.3 lib/byebug/commands/thread/list.rb
byebug-9.0.2 lib/byebug/commands/thread/list.rb
byebug-9.0.1 lib/byebug/commands/thread/list.rb
byebug-9.0.0 lib/byebug/commands/thread/list.rb
byebug-8.2.5 lib/byebug/commands/thread/list.rb
byebug-8.2.4 lib/byebug/commands/thread/list.rb
byebug-8.2.3 lib/byebug/commands/thread/list.rb
byebug-8.2.2 lib/byebug/commands/thread/list.rb
byebug-8.2.1 lib/byebug/commands/thread/list.rb
byebug-8.2.0 lib/byebug/commands/thread/list.rb
byebug-8.1.0 lib/byebug/commands/thread/list.rb