class Byebug::ContinueCommand - byebug-4.0.5 Documentation

# class Byebug::ContinueCommand

Implements the continue command.

Allows the user to continue execution until the next stopping point, a specific line number or until program termination.

### Public Class Methods

description() click to toggle source

    # File lib/byebug/commands/continue.rb, line 36
    def description
      prettify <<-EOD
        c[ont[inue]][ <n>]

        Run until program ends, hits a breakpoint or reaches line <n>.
      EOD
    end

names() click to toggle source

    # File lib/byebug/commands/continue.rb, line 32
    def names
      %w(continue)
    end

### Public Instance Methods

execute() click to toggle source

    # File lib/byebug/commands/continue.rb, line 15
    def execute
      if @match[1]
        num, err = get_int(@match[1], 'Continue', 0, nil)
        return errmsg(err) unless num

        filename = File.expand_path(@state.file)
        unless Breakpoint.potential_line?(filename, num)
          return errmsg(pr('continue.errors.unstopped_line', line: num))
        end

        Breakpoint.add(filename, num)
      end

      @state.proceed
    end

regexp() click to toggle source

    # File lib/byebug/commands/continue.rb, line 11
    def regexp
      /^\s* c(?:ont(?:inue)?)? (?:\s+(\S+))? \s*$/x
    end