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-client-0.0.1.alpha103 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-hydra-client-1.11.5 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-client-0.0.1.alpha101 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-client-0.0.1.alpha100 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-hydra-client-1.11.4 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-client-0.0.1.alpha99 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-client-0.0.1.alpha98 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-client-0.0.1.alpha97 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-client-0.0.1.alpha96 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-client-0.0.1.alpha95 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-client-0.0.1.alpha94 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-client-0.0.1.alpha93 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-client-0.0.1.alpha92 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-oathkeeper-client-0.38.20.beta1 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-client-0.0.1.alpha91 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-client-0.0.1.alpha90 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-client-0.0.1.alpha89 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-client-0.0.1.alpha88 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-client-0.0.1.alpha87 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb
ory-client-0.0.1.alpha86 vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/lib/byebug/commands/info/program.rb