Class: Debugger::RestartCommand
- Inherits:
-
Command
- Object
- SimpleDelegator
- Command
- Debugger::RestartCommand
show all
- Defined in:
- lib/ruby-debug-ide/commands/control.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
65
66
67
68
69
70
71
|
# File 'lib/ruby-debug-ide/commands/control.rb', line 65
def help(cmd)
%{
restart|R [args]
Restart the program. This is is a re-exec - all debugger state
is lost. If command arguments are passed those are used.
}
end
|
.help_command ⇒ Object
61
62
63
|
# File 'lib/ruby-debug-ide/commands/control.rb', line 61
def help_command
'restart'
end
|
Instance Method Details
#execute ⇒ Object
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# File 'lib/ruby-debug-ide/commands/control.rb', line 43
def execute
if not defined? Debugger::RDEBUG_SCRIPT or not defined? Debugger::ARGV
print "We are not in a context we can restart from.\n"
return
end
if @match[2]
args = Debugger::PROG_SCRIPT + " " + @match[2]
else
args = Debugger::ARGV.join(" ")
end
cmd = Debugger::RDEBUG_SCRIPT + " " + args
print "Re exec'ing:\n\t#{cmd}\n"
exec cmd
end
|
#regexp ⇒ Object
35
36
37
38
39
40
41
|
# File 'lib/ruby-debug-ide/commands/control.rb', line 35
def regexp
/ ^\s*
(restart|R)
(\s+ \S+ .*)?
$
/x
end
|