Class: Debugger::ThreadStopCommand
- Inherits:
-
Command
- Object
- SimpleDelegator
- Command
- Debugger::ThreadStopCommand
show all
- Defined in:
- lib/ruby-debug-ide/commands/threads.rb
Overview
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
Class Method Details
.help(cmd) ⇒ Object
113
114
115
116
117
|
# File 'lib/ruby-debug-ide/commands/threads.rb', line 113
def help(cmd)
%{
th[read] stop <nnn>\t\tstop thread nnn
}
end
|
.help_command ⇒ Object
109
110
111
|
# File 'lib/ruby-debug-ide/commands/threads.rb', line 109
def help_command
'thread'
end
|
Instance Method Details
#execute ⇒ Object
95
96
97
98
99
100
101
102
103
104
105
106
|
# File 'lib/ruby-debug-ide/commands/threads.rb', line 95
def execute
c = get_context(@match[1].to_i)
case
when c == @state.context
print_msg "It's the current thread."
when c.ignored?
print_msg "Can't stop the debugger thread."
else
c.suspend
print_context(c)
end
end
|
#regexp ⇒ Object
91
92
93
|
# File 'lib/ruby-debug-ide/commands/threads.rb', line 91
def regexp
/^\s*th(?:read)?\s+stop\s+(\d+)\s*$/
end
|