# class Byebug::DebugCommand

Spawns a subdebugger and evaluates the given expression

### Public Class Methods

description() click to toggle source

    # File lib/byebug/commands/debug.rb, line 17
        def self.description
          <<-DESCRIPTION
            debug <expression>

            #{short_description}

            Allows, for example, setting breakpoints on expressions evaluated from
            the debugger's prompt.
          DESCRIPTION
        end

regexp() click to toggle source

    # File lib/byebug/commands/debug.rb, line 13
    def self.regexp
      /^\s* debug (?:\s+(\S+))? \s*$/x
    end

short_description() click to toggle source

    # File lib/byebug/commands/debug.rb, line 28
    def self.short_description
      "Spawns a subdebugger"
    end

### Public Instance Methods

execute() click to toggle source

    # File lib/byebug/commands/debug.rb, line 32
    def execute
      return puts(help) unless @match[1]

      puts safe_inspect(separate_thread_eval(@match[1]))
    end