Class: Debugger::ThreadResumeCommand
- Includes:
- ThreadFunctions
- Defined in:
- lib/ruby-debug/commands/threads.rb
Overview
:nodoc:
Constant Summary
Constants inherited from Command
Class Method Summary collapse
Instance Method Summary collapse
Methods included from ThreadFunctions
#debugger_thread?, #display_context
Methods inherited from Command
commands, inherited, #initialize, load_commands, #match, method_missing, options
Constructor Details
This class inherits a constructor from Debugger::Command
Class Method Details
.help(cmd) ⇒ Object
180 181 182 183 184 |
# File 'lib/ruby-debug/commands/threads.rb', line 180 def help(cmd) %{ th[read] resume <nnn>\t\tresume thread nnn } end |
.help_command ⇒ Object
176 177 178 |
# File 'lib/ruby-debug/commands/threads.rb', line 176 def help_command 'thread' end |
Instance Method Details
#execute ⇒ Object
160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/ruby-debug/commands/threads.rb', line 160 def execute c = get_context(@match[1].to_i) case when c == @state.context print "It's the current thread.\n" when debugger_thread?(c) print "Can't resume the debugger thread.\n" when !c.thread.stop? print "Already running." else display_context(c) c.resume end end |
#regexp ⇒ Object
156 157 158 |
# File 'lib/ruby-debug/commands/threads.rb', line 156 def regexp /^\s*th(?:read)?\s+resume\s+(\d+)\s*$/ end |