Class: Debugger::DetachCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/ruby-debug-ide/commands/control.rb

Overview

:nodoc:

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

Constructor Details

This class inherits a constructor from Debugger::Command

Class Method Details

.help(cmd) ⇒ Object



151
152
153
154
155
# File 'lib/ruby-debug-ide/commands/control.rb', line 151

def help(cmd)
  %{
    detach\ndetach debugger\nnote: this option is only for remote debugging (or local attach)
  }
end

.help_commandObject



147
148
149
# File 'lib/ruby-debug-ide/commands/control.rb', line 147

def help_command
  'detach'
end

Instance Method Details

#executeObject



138
139
140
141
142
143
144
# File 'lib/ruby-debug-ide/commands/control.rb', line 138

def execute
  Debugger.stop
  Debugger.interface.close
  Debugger::MultiProcess.undo_monkey
  Debugger.control_thread = nil
  Thread.current.exit #@control_thread is a current thread
end

#regexpObject



134
135
136
# File 'lib/ruby-debug-ide/commands/control.rb', line 134

def regexp
  /^\s*detach\s*$/
end