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



157
158
159
160
161
# File 'lib/ruby-debug-ide/commands/control.rb', line 157

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

.help_commandObject



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

def help_command
  'detach'
end

Instance Method Details

#executeObject



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

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



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

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