Sha256: 373e7d9d905c4a84351e1aebc7dfb6d0b7127af5ef13ae51906d386709768134

Contents?: true

Size: 856 Bytes

Versions: 2

Compression:

Stored size: 856 Bytes

Contents

require 'byebug/helpers/toggle'

module Byebug
  #
  # Reopens the +disable+ command to define the +breakpoints+ subcommand
  #
  class DisableCommand < Command
    #
    # Disables all or specific breakpoints
    #
    class BreakpointsSubcommand < Command
      include Helpers::ToggleHelper

      def regexp
        /^\s* b(?:reakpoints)? (?:\s+ (.+))? \s*$/x
      end

      def execute
        enable_disable_breakpoints('disable', @match[1])
      end

      def short_description
        'Disable all or specific breakpoints.'
      end

      def description
        <<-EOD
          dis[able] b[reakpoints][ <id1> <id2> .. <idn>]

          #{short_description}

          Give breakpoint numbers (separated by spaces) as arguments or no
          argument at all if you want to disable every breakpoint.
        EOD
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/byebug-5.0.0/lib/byebug/commands/disable/breakpoints.rb
byebug-5.0.0 lib/byebug/commands/disable/breakpoints.rb