Class: Debugger::PauseCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/ruby-debug-ide/commands/pause.rb

Overview

Implements debugger “pause” command

Constant Summary

Constants inherited from Command

Command::DEF_OPTIONS

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Command

commands, file_filter_supported?, #find, inherited, #initialize, load_commands, #match, method_missing, options, unescape_incoming

Constructor Details

This class inherits a constructor from Debugger::Command

Class Method Details

.help(cmd) ⇒ Object



26
27
28
29
30
# File 'lib/ruby-debug-ide/commands/pause.rb', line 26

def help(cmd)
  %{
    pause <nnn>\tpause a running thread
   }
end

.help_commandObject



22
23
24
# File 'lib/ruby-debug-ide/commands/pause.rb', line 22

def help_command
  %w[pause]
end

Instance Method Details

#executeObject



11
12
13
14
15
16
17
18
19
# File 'lib/ruby-debug-ide/commands/pause.rb', line 11

def execute
  Debugger.contexts.each do |c|
    unless c.respond_to?(:pause)
      print_msg "Not implemented"
      return
    end
    c.pause
  end
end

#regexpObject



7
8
9
# File 'lib/ruby-debug-ide/commands/pause.rb', line 7

def regexp
  /^\s*pause\s*(?:\s+(\S+))?\s*$/
end