Class: Debugger::ThreadSwitchCommand
- Inherits:
-
Command
- Object
- SimpleDelegator
- Command
- Debugger::ThreadSwitchCommand
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
54
55
56
57
58
|
# File 'lib/ruby-debug-ide/commands/threads.rb', line 54
def help(cmd)
%{
th[read] [sw[itch]] <nnn>\tswitch thread context to nnn
}
end
|
.help_command ⇒ Object
50
51
52
|
# File 'lib/ruby-debug-ide/commands/threads.rb', line 50
def help_command
'thread'
end
|
Instance Method Details
#execute ⇒ Object
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/ruby-debug-ide/commands/threads.rb', line 34
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 switch to the debugger thread."
else
print_context(c)
c.stop_next = 1
c.thread.run
@state.proceed
end
end
|
#regexp ⇒ Object
30
31
32
|
# File 'lib/ruby-debug-ide/commands/threads.rb', line 30
def regexp
/^\s*th(?:read)?\s+(?:sw(?:itch)?\s+)?(\d+)\s*$/
end
|