Sha256: a15f3e48d9ae282d6bc387420b0867bc997a82b1853b51c856cd977dbcb2e17b

Contents?: true

Size: 1.05 KB

Versions: 6506

Compression:

Stored size: 1.05 KB

Contents

# frozen_string_literal: true

module Byebug
  #
  # Reopens the +info+ command to define the +args+ subcommand
  #
  class InfoCommand < Command
    #
    # Information about arguments of the current method/block
    #
    class ProgramCommand < Command
      self.allow_in_post_mortem = true

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

      def self.description
        <<-DESCRIPTION
          inf[o] p[rogram]

          #{short_description}
        DESCRIPTION
      end

      def self.short_description
        "Information about the current status of the debugged program."
      end

      def execute
        puts "Program stopped. "
        format_stop_reason context.stop_reason
      end

      private

      def format_stop_reason(stop_reason)
        case stop_reason
        when :step
          puts "It stopped after stepping, next'ing or initial start."
        when :breakpoint
          puts "It stopped at a breakpoint."
        when :catchpoint
          puts "It stopped at a catchpoint."
        end
      end
    end
  end
end

Version data entries

6,506 entries across 6,502 versions & 34 rubygems

Version Path
cybrid_api_organization_ruby-0.122.67 vendor/bundle/ruby/3.3.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
cybrid_api_id_ruby-0.122.67 vendor/bundle/ruby/3.3.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
cybrid_api_bank_ruby-0.122.66 vendor/bundle/ruby/3.3.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
cybrid_api_organization_ruby-0.122.66 vendor/bundle/ruby/3.3.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
cybrid_api_id_ruby-0.122.66 vendor/bundle/ruby/3.3.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
cybrid_api_id_ruby-0.122.65 vendor/bundle/ruby/3.3.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
cybrid_api_bank_ruby-0.122.65 vendor/bundle/ruby/3.3.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
cybrid_api_organization_ruby-0.122.65 vendor/bundle/ruby/3.3.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
cybrid_api_bank_ruby-0.122.64 vendor/bundle/ruby/3.3.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
cybrid_api_id_ruby-0.122.64 vendor/bundle/ruby/3.3.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
cybrid_api_organization_ruby-0.122.64 vendor/bundle/ruby/3.3.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
cybrid_api_id_ruby-0.122.60 vendor/bundle/ruby/3.3.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
cybrid_api_bank_ruby-0.122.60 vendor/bundle/ruby/3.3.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
cybrid_api_organization_ruby-0.122.60 vendor/bundle/ruby/3.3.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
cybrid_api_organization_ruby-0.122.59 vendor/bundle/ruby/3.3.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
cybrid_api_bank_ruby-0.122.59 vendor/bundle/ruby/3.3.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
cybrid_api_id_ruby-0.122.59 vendor/bundle/ruby/3.3.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
cybrid_api_bank_ruby-0.122.58 vendor/bundle/ruby/3.3.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
cybrid_api_organization_ruby-0.122.58 vendor/bundle/ruby/3.3.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
cybrid_api_id_ruby-0.122.58 vendor/bundle/ruby/3.3.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb