Sha256: cac8026232e259d5372f13e7db7ff47bddfb4f6851c3249238c6a9cf69e27aaa

Contents?: true

Size: 936 Bytes

Versions: 7

Compression:

Stored size: 936 Bytes

Contents

module Byebug

  # Implements byebug "continue" command.
  class ContinueCommand < Command
    self.allow_in_post_mortem = true
    self.need_context         = false

    def regexp
      /^\s* c(?:ont(?:inue)?)? (?:\s+(.*))? $/x
    end

    def execute
      if @match[1] && !@state.context.dead?
        filename = File.expand_path(@state.file)
        return unless line_number = get_int(@match[1], "Continue", 0, nil, 0)
        return errmsg "Line #{line_number} is not a stopping point in file " \
                      "\"#{filename}\"\n" unless
          LineCache.trace_line_numbers(filename).member?(line_number)

        Byebug.add_breakpoint filename, line_number
      end
      @state.proceed
    end

    class << self
      def names
        %w(continue)
      end

      def description
        %{c[ont[inue]][ nnn]

          Run until program ends, hits a breakpoint or reaches line nnn}
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
byebug-1.8.1 lib/byebug/commands/continue.rb
byebug-1.8.0 lib/byebug/commands/continue.rb
byebug-1.7.0 lib/byebug/commands/continue.rb
byebug-1.6.1 lib/byebug/commands/continue.rb
byebug-1.6.0 lib/byebug/commands/continue.rb
byebug-1.5.0 lib/byebug/commands/continue.rb
byebug-1.4.2 lib/byebug/commands/continue.rb