Debugging Ruby Code

3rdRail leverages standard Eclipse mechanisms to support Ruby.

To debug a Ruby script:

  1. Open the Ruby file and set any desired breakpoints.
  2. Start a Ruby debug session:
    Run| Debug As| Ruby Script.
    The Debug Perspective opens with the following views:
    View Description

    Debug

    Provides information about the stack frame for the suspended threads for each target and the process for each target. The thread appears as a node in the tree.

    Variables

    Provides information about variables in the currently-selected stack frame.

    Breakpoints

    Lists all set breakpoints.

    Server

    Lists all servers and describes configuration.

    Outline

    Provides project structure details.

    Console

    Shows the Ruby Console.

    Tasks

    Assign tasks for the project.

    Debug activity appears in the Progress view.
  3. Set a breakpoint as desired by double right-clicking the left margin of the editor at the first line of the code.

    Note:

    Repeat the double right-click to remove the breakpoint.

  4. Step through code in the Launch view:
  5. Click Resume to resume the application.

Corporate LogoCodeGear brand and product names are service marks, trademarks or registered trademarks of Borland Software Corporation in the United States and other countries.