# Rails debug

**URL:** <https://www.ruby-forum.com/t/rails-debug/139037>\
**Category:** Rails\
**Created:** [May 30, 2008, 10:06am UTC](https://www.ruby-forum.com/t/rails-debug/139037 "2008-05-30T10:06:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [May 30, 2008, 10:06am UTC](https://www.ruby-forum.com/t/rails-debug/139037/1 "2008-05-30T10:06:15Z")

</div>

Hi guys,  
Now I own rails application for my website. But when some changes  
happens, the debug way will  
be bramble. Is there any IDE or method release it? I mean if you would  
like to debug the java program, you can set the breakpoint in the  
Eclipse or NetBeans. But in Aptana, I feel it is difficult to debug my  
application. Is there any suggestion or advice?

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [May 30, 2008, 3:55pm UTC](https://www.ruby-forum.com/t/rails-debug/139037/2 "2008-05-30T15:55:46Z")

</div>

I’ld strongly recommend the console debug tools using the debugger()  
method. It is extremely effective and easy to use once you get the  
hang of it.

On May 30, 2:48 am, “removed\_email\_address@domain.invalid” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [May 30, 2008, 4:20pm UTC](https://www.ruby-forum.com/t/rails-debug/139037/3 "2008-05-30T16:20:28Z")

</div>

> Well tools for rails or ruby aren’t as mature as java. But at a basic  
> level if you start your server with --debugger and then call  
> debugger() anywhere in your app then you application will stop when it  
> hits that. It’s a command line interfact but you can do the usual  
> stuff (inspect state, step through code etc…). 3rd rail claims to  
> have a whizzy graphical thing ([http://www.codegear.com/article/](http://www.codegear.com/article/)  
> 37968#2FastDebugging) but i’ve never used 3rd rail so I couldn’t say  
> what it’s like.

I have been using Rails for nearly two years - about 6 apps - and I have  
never  
once invoked the debugger. Neither has my current team, who has been  
Railing for  
almost 3 years.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [May 30, 2008, 4:23pm UTC](https://www.ruby-forum.com/t/rails-debug/139037/4 "2008-05-30T16:23:57Z")

</div>

If you are using Windows you may want to try Ruby In Steel. we have the  
fastest debugger for standard Ruby with all kinds of visual debugging  
including:

- breakpoints
- conditional breakpoints
- trace points
- run macro on break
- drill-down watch variables
- hover+drilldown inspection
- dynamic debugging (change values while debugging)
- call stack navigation
- set breakpoints and debug into ERb/Rhtml
- JRuby debugging
- step into/out/over
- and lots, lots more…

More info here:

[http://www.sapphiresteel.com/Debugging-Ruby-with-the-Cylon](http://www.sapphiresteel.com/Debugging-Ruby-with-the-Cylon)  
[http://www.sapphiresteel.com/Dynamic-Debugging-In-Ruby](http://www.sapphiresteel.com/Dynamic-Debugging-In-Ruby)  
[http://www.sapphiresteel.com/Ruby-Debugger-Enhancements](http://www.sapphiresteel.com/Ruby-Debugger-Enhancements)  
[http://www.sapphiresteel.com/How-To-Debug-Ruby-Inside-RHTML](http://www.sapphiresteel.com/How-To-Debug-Ruby-Inside-RHTML)

best wishes  
Huw C.

SapphireSteel Software  
Ruby and Rails In Visual Studio  
[http://www.sapphiresteel.com](http://www.sapphiresteel.com)

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [May 30, 2008, 1:02pm UTC](https://www.ruby-forum.com/t/rails-debug/139037/5 "2008-05-30T13:02:56Z")

</div>

On May 30, 8:48 am, “removed\_email\_address@domain.invalid” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Hi guys,  
> Now I own rails application for my website. But when some changes  
> happens, the debug way will  
> be bramble. Is there any IDE or method release it? I mean if you would  
> like to debug the java program, you can set the breakpoint in the  
> Eclipse or NetBeans. But in Aptana, I feel it is difficult to debug my  
> application. Is there any suggestion or advice?

Well tools for rails or ruby aren’t as mature as java. But at a basic  
level if you start your server with --debugger and then call  
debugger() anywhere in your app then you application will stop when it  
hits that. It’s a command line interfact but you can do the usual  
stuff (inspect state, step through code etc…). 3rd rail claims to  
have a whizzy graphical thing ([http://www.codegear.com/article/](http://www.codegear.com/article/)  
37968#2FastDebugging) but i’ve never used 3rd rail so I couldn’t say  
what it’s like.

Fred

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [May 30, 2008, 4:24pm UTC](https://www.ruby-forum.com/t/rails-debug/139037/6 "2008-05-30T16:24:42Z")

</div>

> ```
> Now I own rails application for my website. But when some changes
> 
> ```
> 
> happens, the debug way will  
> be bramble. Is there any IDE or method release it? I mean if you would  
> like to debug the java program, you can set the breakpoint in the  
> Eclipse or NetBeans. But in Aptana, I feel it is difficult to debug my  
> application. Is there any suggestion or advice?

Write unit tests for every feature.

A test that calls a method is like a breakpoint on that method, and an  
assertion  
that compares its return value to a reference is like watching a  
variable.

Better, you don’t need to debug over and over and over again when you  
change  
anything. You just run all the tests.
