Class: Debugger::QuitCommand
- Inherits:
-
Command
- Object
- SimpleDelegator
- Command
- Debugger::QuitCommand
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
29
30
31
32
33
34
|
# File 'lib/ruby-debug-ide/commands/control.rb', line 29
def help(cmd)
%{
q[uit]\texit from debugger,
exit\talias to quit
}
end
|
.help_command ⇒ Object
25
26
27
|
# File 'lib/ruby-debug-ide/commands/control.rb', line 25
def help_command
%w[quit exit]
end
|
Instance Method Details
#execute ⇒ Object
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/ruby-debug-ide/commands/control.rb', line 9
def execute
begin
if ENV['DEBUGGER_KEEP_PROCESS_ALIVE'] == "true"
@delegate_sd_obj.interface.closing = true
Debugger.breakpoints.clear
@delegate_sd_obj.interface.command_queue << 'c'
else
@printer.print_msg("finished")
@printer.print_debug("Exiting debugger.")
end
ensure
exit! unless ENV['DEBUGGER_KEEP_PROCESS_ALIVE'] == "true"
end
end
|
#regexp ⇒ Object
5
6
7
|
# File 'lib/ruby-debug-ide/commands/control.rb', line 5
def regexp
/^\s*(?:q(?:uit)?|exit)\s*$/
end
|