Rdebug usage

Hi,

I have a couple of questions about using rdebug

  1. When you are passing parameters to a ruby script how do you do that
    when you call your ruby script with rdebug?
  2. When control passes from one ruby script to another in an application
    how can breakpoints be set within a nested structure of ruby scripts?

Regards,
David

P.S. Is this the best place to pose questions about rdebug?

On Tue, Oct 20, 2009 at 9:23 PM, David S. [email protected]
wrote:

Hi,

I have a couple of questions about using rdebug

  1. When you are passing parameters to a ruby script how do you do that
    when you call your ruby script with rdebug?

From the example given by rdebug --help

Usage: rdebug [options] <script.rb> – <script.rb parameters>

In other words after the name of the script use a double - then the
parameters for the script.

  1. When control passes from one ruby script to another in an application
    how can breakpoints be set within a nested structure of ruby scripts?

with the rdebug breakpoint command

b path/to/some_ruby_script.rb:42

The file does not need to have been previously loaded.

where 42 is the line number where you want the breakpoint set.

There are also extensions to various editors which allow breakpoints
to be set from the editor after initiating a session with the
debugger. For example the RubyAmp textmate bundle allows this.


Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs