Jump to: navigation, search

Difference between revisions of "DLTK Ruby RemoteDebugger"

 
(3 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
== Extract DLTK ruby code ==
 
== Extract DLTK ruby code ==
  
You need to extract .rb files from the following plugins
+
You need to extract '''<tt>.rb</tt>''' files from the following plugins
- org.eclipse.dltk.ruby.abstractdebugger
+
* org.eclipse.dltk.ruby.abstractdebugger
- org.eclipse.dltk.ruby.fastdebugger
+
* org.eclipse.dltk.ruby.fastdebugger
  
 
for example I have extracted them to the C:\DLTK-RUBY-DBG, now that folder contains the following files:
 
for example I have extracted them to the C:\DLTK-RUBY-DBG, now that folder contains the following files:
  
- C:\DLTK-RUBY-DBG\AbstractRunner.rb
+
<pre>
- C:\DLTK-RUBY-DBG\FastRunner.rb
+
C:\DLTK-RUBY-DBG\AbstractRunner.rb
- C:\DLTK-RUBY-DBG\common\FileLogManager.rb
+
C:\DLTK-RUBY-DBG\FastRunner.rb
- C:\DLTK-RUBY-DBG\common\Logger.rb
+
C:\DLTK-RUBY-DBG\common\FileLogManager.rb
- C:\DLTK-RUBY-DBG\common\NullLogManager.rb
+
C:\DLTK-RUBY-DBG\common\Logger.rb
- C:\DLTK-RUBY-DBG\common\Params.rb
+
C:\DLTK-RUBY-DBG\common\NullLogManager.rb
- C:\DLTK-RUBY-DBG\common\StdoutLogManager.rb
+
C:\DLTK-RUBY-DBG\common\Params.rb
- C:\DLTK-RUBY-DBG\dbgp\BreakpointElement.rb
+
C:\DLTK-RUBY-DBG\common\StdoutLogManager.rb
- C:\DLTK-RUBY-DBG\dbgp\CaptureManager.rb
+
C:\DLTK-RUBY-DBG\dbgp\BreakpointElement.rb
- C:\DLTK-RUBY-DBG\dbgp\Command.rb
+
C:\DLTK-RUBY-DBG\dbgp\CaptureManager.rb
- C:\DLTK-RUBY-DBG\dbgp\CommandHandler.rb
+
C:\DLTK-RUBY-DBG\dbgp\Command.rb
- C:\DLTK-RUBY-DBG\dbgp\Communicator.rb
+
C:\DLTK-RUBY-DBG\dbgp\CommandHandler.rb
- C:\DLTK-RUBY-DBG\dbgp\DbgpThread.rb
+
C:\DLTK-RUBY-DBG\dbgp\Communicator.rb
- C:\DLTK-RUBY-DBG\dbgp\ErrorElement.rb
+
C:\DLTK-RUBY-DBG\dbgp\DbgpThread.rb
- C:\DLTK-RUBY-DBG\dbgp\ErrorMessages.rb
+
C:\DLTK-RUBY-DBG\dbgp\ErrorElement.rb
- C:\DLTK-RUBY-DBG\dbgp\InitPacket.rb
+
C:\DLTK-RUBY-DBG\dbgp\ErrorMessages.rb
- C:\DLTK-RUBY-DBG\dbgp\PropertyElement.rb
+
C:\DLTK-RUBY-DBG\dbgp\InitPacket.rb
- C:\DLTK-RUBY-DBG\dbgp\PropertyUtils.rb
+
C:\DLTK-RUBY-DBG\dbgp\PropertyElement.rb
- C:\DLTK-RUBY-DBG\dbgp\Response.rb
+
C:\DLTK-RUBY-DBG\dbgp\PropertyUtils.rb
- C:\DLTK-RUBY-DBG\dbgp\SourceManager.rb
+
C:\DLTK-RUBY-DBG\dbgp\Response.rb
- C:\DLTK-RUBY-DBG\dbgp\StackLevelElement.rb
+
C:\DLTK-RUBY-DBG\dbgp\SourceManager.rb
- C:\DLTK-RUBY-DBG\dbgp\StreamPacket.rb
+
C:\DLTK-RUBY-DBG\dbgp\StackLevelElement.rb
- C:\DLTK-RUBY-DBG\dbgp\ThreadEventHandler.rb
+
C:\DLTK-RUBY-DBG\dbgp\StreamPacket.rb
- C:\DLTK-RUBY-DBG\dbgp\ThreadManager.rb
+
C:\DLTK-RUBY-DBG\dbgp\ThreadEventHandler.rb
- C:\DLTK-RUBY-DBG\dbgp\Utils.rb
+
C:\DLTK-RUBY-DBG\dbgp\ThreadManager.rb
- C:\DLTK-RUBY-DBG\dbgp\XmlElement.rb
+
C:\DLTK-RUBY-DBG\dbgp\Utils.rb
- C:\DLTK-RUBY-DBG\debugger\AbstractBreakpointManager.rb
+
C:\DLTK-RUBY-DBG\dbgp\XmlElement.rb
- C:\DLTK-RUBY-DBG\debugger\AbstractContext.rb
+
C:\DLTK-RUBY-DBG\debugger\AbstractBreakpointManager.rb
- C:\DLTK-RUBY-DBG\debugger\AbstractDebugger.rb
+
C:\DLTK-RUBY-DBG\debugger\AbstractContext.rb
- C:\DLTK-RUBY-DBG\debugger\BreakpointContracts.rb
+
C:\DLTK-RUBY-DBG\debugger\AbstractDebugger.rb
- C:\DLTK-RUBY-DBG\debugger\DebugEventHandler.rb
+
C:\DLTK-RUBY-DBG\debugger\BreakpointContracts.rb
- C:\DLTK-RUBY-DBG\debugger\Exceptions.rb
+
C:\DLTK-RUBY-DBG\debugger\DebugEventHandler.rb
- C:\DLTK-RUBY-DBG\debugger\FeatureManager.rb
+
C:\DLTK-RUBY-DBG\debugger\Exceptions.rb
- C:\DLTK-RUBY-DBG\debugger\SimpleBreakpoints.rb
+
C:\DLTK-RUBY-DBG\debugger\FeatureManager.rb
- C:\DLTK-RUBY-DBG\debugger\StackLevelInfo.rb
+
C:\DLTK-RUBY-DBG\debugger\SimpleBreakpoints.rb
- C:\DLTK-RUBY-DBG\fast\FastBreakpointManager.rb
+
C:\DLTK-RUBY-DBG\debugger\StackLevelInfo.rb
- C:\DLTK-RUBY-DBG\fast\FastContext.rb
+
C:\DLTK-RUBY-DBG\fast\FastBreakpointManager.rb
- C:\DLTK-RUBY-DBG\fast\FastDebugger.rb
+
C:\DLTK-RUBY-DBG\fast\FastContext.rb
- C:\DLTK-RUBY-DBG\fast\FastLineBreakpoint.rb
+
C:\DLTK-RUBY-DBG\fast\FastDebugger.rb
 +
C:\DLTK-RUBY-DBG\fast\FastLineBreakpoint.rb
 +
</pre>
 +
 
 +
== Listen for remote connection ==
 +
 
 +
* Click on Run | Open Debug Dialog.
 +
* Select "Remote Ruby Application" and click on <New Launch configuration>.
 +
* Change configuration name and (probably) ide key (ide key is used to distinguish different remote sessions at the protocol level)
 +
* Click on <Apply>, then <Debug>
  
 
== Start debugger ==
 
== Start debugger ==
Line 53: Line 62:
 
To start debugging you need to execute commands similar to the following:
 
To start debugging you need to execute commands similar to the following:
  
\# set address of the machine the Eclipse DLTK is running on
+
<source lang="bash">
 +
# set address of the machine the Eclipse DLTK is running on
 
set DBGP_RUBY_HOST=192.168.3.135
 
set DBGP_RUBY_HOST=192.168.3.135
\# set ide key specified in the remote launch configuration
+
# set ide key specified in the remote launch configuration
 
set DBGP_RUBY_KEY=REMOTE-DEBUG-1
 
set DBGP_RUBY_KEY=REMOTE-DEBUG-1
\# set port (can be configured in preferences)
+
# set port (can be configured in preferences)
 
set DBGP_RUBY_PORT=10000
 
set DBGP_RUBY_PORT=10000
\# start ruby where START.rb is the main file of the application.
+
# start ruby where START.rb is the main file of the application.
 
c:\ruby\bin\ruby.exe -I C:\DLTK-RUBY-DBG -r FastRunner.rb START.rb
 
c:\ruby\bin\ruby.exe -I C:\DLTK-RUBY-DBG -r FastRunner.rb START.rb
                                  --
+
</source>
 +
 
 +
[[Category:DLTK]]

Latest revision as of 22:05, 15 January 2009

This document describes how to start remote debugger using fast ruby debugger (ruby-debug gem).

Extract DLTK ruby code

You need to extract .rb files from the following plugins

  • org.eclipse.dltk.ruby.abstractdebugger
  • org.eclipse.dltk.ruby.fastdebugger

for example I have extracted them to the C:\DLTK-RUBY-DBG, now that folder contains the following files:

C:\DLTK-RUBY-DBG\AbstractRunner.rb
C:\DLTK-RUBY-DBG\FastRunner.rb
C:\DLTK-RUBY-DBG\common\FileLogManager.rb
C:\DLTK-RUBY-DBG\common\Logger.rb
C:\DLTK-RUBY-DBG\common\NullLogManager.rb
C:\DLTK-RUBY-DBG\common\Params.rb
C:\DLTK-RUBY-DBG\common\StdoutLogManager.rb
C:\DLTK-RUBY-DBG\dbgp\BreakpointElement.rb
C:\DLTK-RUBY-DBG\dbgp\CaptureManager.rb
C:\DLTK-RUBY-DBG\dbgp\Command.rb
C:\DLTK-RUBY-DBG\dbgp\CommandHandler.rb
C:\DLTK-RUBY-DBG\dbgp\Communicator.rb
C:\DLTK-RUBY-DBG\dbgp\DbgpThread.rb
C:\DLTK-RUBY-DBG\dbgp\ErrorElement.rb
C:\DLTK-RUBY-DBG\dbgp\ErrorMessages.rb
C:\DLTK-RUBY-DBG\dbgp\InitPacket.rb
C:\DLTK-RUBY-DBG\dbgp\PropertyElement.rb
C:\DLTK-RUBY-DBG\dbgp\PropertyUtils.rb
C:\DLTK-RUBY-DBG\dbgp\Response.rb
C:\DLTK-RUBY-DBG\dbgp\SourceManager.rb
C:\DLTK-RUBY-DBG\dbgp\StackLevelElement.rb
C:\DLTK-RUBY-DBG\dbgp\StreamPacket.rb
C:\DLTK-RUBY-DBG\dbgp\ThreadEventHandler.rb
C:\DLTK-RUBY-DBG\dbgp\ThreadManager.rb
C:\DLTK-RUBY-DBG\dbgp\Utils.rb
C:\DLTK-RUBY-DBG\dbgp\XmlElement.rb
C:\DLTK-RUBY-DBG\debugger\AbstractBreakpointManager.rb
C:\DLTK-RUBY-DBG\debugger\AbstractContext.rb
C:\DLTK-RUBY-DBG\debugger\AbstractDebugger.rb
C:\DLTK-RUBY-DBG\debugger\BreakpointContracts.rb
C:\DLTK-RUBY-DBG\debugger\DebugEventHandler.rb
C:\DLTK-RUBY-DBG\debugger\Exceptions.rb
C:\DLTK-RUBY-DBG\debugger\FeatureManager.rb
C:\DLTK-RUBY-DBG\debugger\SimpleBreakpoints.rb
C:\DLTK-RUBY-DBG\debugger\StackLevelInfo.rb
C:\DLTK-RUBY-DBG\fast\FastBreakpointManager.rb
C:\DLTK-RUBY-DBG\fast\FastContext.rb
C:\DLTK-RUBY-DBG\fast\FastDebugger.rb
C:\DLTK-RUBY-DBG\fast\FastLineBreakpoint.rb

Listen for remote connection

  • Click on Run | Open Debug Dialog.
  • Select "Remote Ruby Application" and click on <New Launch configuration>.
  • Change configuration name and (probably) ide key (ide key is used to distinguish different remote sessions at the protocol level)
  • Click on <Apply>, then <Debug>

Start debugger

To start debugging you need to execute commands similar to the following:

# set address of the machine the Eclipse DLTK is running on
set DBGP_RUBY_HOST=192.168.3.135
# set ide key specified in the remote launch configuration
set DBGP_RUBY_KEY=REMOTE-DEBUG-1
# set port (can be configured in preferences)
set DBGP_RUBY_PORT=10000
# start ruby where START.rb is the main file of the application.
c:\ruby\bin\ruby.exe -I C:\DLTK-RUBY-DBG -r FastRunner.rb START.rb