Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] ruby remote debugging

Hi all,

DLTK ruby debugger can be used to.

1) The ruby-debug gem should be installed (it works faster than built-in debugger)
2) The communication protocol is implemented in ruby, so you need to manually place its files on the remote machine.

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

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

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

Regards,
Alex

Jae Gangemi wrote:

  you need to create a 'remote launch configuration' inside eclipse and kick it off. it uses a default 'ide key' of 'idekey', which can be changed from the launch configuration tab.

  you will also need a debugging engine on your remote host. at the moment, the basic and fast ruby debuggers are client side only, so i believe your only available option at this point is active state's engine.

  you can follow the instructions here to kick off a remote ruby application, just make sure you've kicked off the remote launch config first.

  http://aspn.activestate.com/ASPN/docs/Komodo/4.4/debugruby.html

  it should be noted that remote debugging sessions don't respect any breakpoints that have been set in the ide right now, but i'm working to find a solution for that problem.
 

On Wed, Jun 25, 2008 at 7:37 AM, Ittay Dror <ittay.dror@xxxxxxxxx> wrote:
Hi,

Sorry for posting to a 'dev' list, couldn't find a 'user' list.

I want to debug a remote ruby application and can't find any howto regarding ruby dltk (other than a post saying ruby-debug doesn't work). Can you please explain or point me to an explanation about how to run the ruby application and what parameters to pass (esp. what is 'ide key')?

Thank you,
Ittay

--
--
Ittay Dror <ittay.dror@xxxxxxxxx>


_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev



--
-jae

_______________________________________________ dltk-dev mailing list dltk-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/dltk-dev

Back to the top