Sha256: a15f3e48d9ae282d6bc387420b0867bc997a82b1853b51c856cd977dbcb2e17b

Contents?: true

Size: 1.05 KB

Versions: 6833

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,833 entries across 6,829 versions & 37 rubygems

Version Path
ory-oathkeeper-client-0.38.19.beta1 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-oathkeeper-client-0.38.18.beta1 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-oathkeeper-client-0.38.17.beta1 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
avalara_sdk-2.4.7 vendor/bundle/ruby/2.6.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
mountapi-0.11.1 vendor/bundle/ruby/2.7.0/gems/byebug-10.0.2/lib/byebug/commands/info/program.rb
ory-client-0.0.1.alpha58 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-client-0.0.1.alpha57 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-client-0.0.1.alpha56 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-client-0.0.1.alpha55 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-client-0.0.1.alpha54 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-client-0.0.1.alpha53 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-client-0.0.1.alpha52 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-client-0.0.1.alpha51 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-client-0.0.1.alpha50 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-client-0.0.1.alpha49 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-client-0.0.1.alpha48 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-client-0.0.1.alpha47 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-client-0.0.1.alpha46 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-client-0.0.1.alpha45 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-client-0.0.1.alpha44 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb