# Debugging Radiant

**URL:** <https://www.ruby-forum.com/t/debugging-radiant/118291>\
**Category:** Radiant CMS\
**Created:** [October 25, 2007, 12:35pm UTC](https://www.ruby-forum.com/t/debugging-radiant/118291 "2007-10-25T12:35:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![richardchaven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e480ec/32.png) [@richardchaven](https://www.ruby-forum.com/u/richardchaven)\
**Post date:** [October 25, 2007, 12:35pm UTC](https://www.ruby-forum.com/t/debugging-radiant/118291/1 "2007-10-25T12:35:40Z")

</div>

Hey all,

I’m an old programmer that’s new to Ruby [on Rails] and Radiant and I’m  
having debug trouble. I’m messing with the Back\_Door extension and have  
no  
idea how to even output debug info to a log file. In other languages I  
would use printf() or println() and I think there is a logger function  
in  
Ruby but I don’t know how to use it. The other thing I would like to do  
is  
breakpoint processing. Generally I like exploring a new language though  
the  
debugger and walking through object memory. Things like the “page”  
object  
in Radiant is a mystery to me right now. Are there debuggers  
(graphical,  
interactive) that would help me? How does everyone else (except Sean 🙂  
develop Radiant code? Surely not everyone has memorized the entire  
object  
model! 🙂

Thanx!  
Richard

---

<div class="post-metadata">

**Author:** ![richardchaven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e480ec/32.png) [@richardchaven](https://www.ruby-forum.com/u/richardchaven)\
**Post date:** [October 25, 2007, 1:02pm UTC](https://www.ruby-forum.com/t/debugging-radiant/118291/2 "2007-10-25T13:02:00Z")

</div>

Hi!,

```
A fast way to output debug info is to just use "puts" in your Ruby

```

code. The output will go to the console where you started the server  
from.  
Just put some markers in your output to distinguish it easily from all  
the  
output.

You can also write to Rails log directly using the @log object. Then  
watch your output with something like “tail -f log/.log”. Or  
create  
your own log with [http://www.ruby-doc.org/core/classes/Logger.html](http://www.ruby-doc.org/core/classes/Logger.html)  
(Rails  
@log object is of this class).

For debugging, i recommend you [DATANOISE.COM](http://www.datanoise.com/ruby-debug/) ,  
it  
works great with Rails. I don’t know if there is a GUI on top of that.  
“rdebug script/server -e ” is the magic command.

Regarding Radiant internals, you can refer to the source code. For  
example, this is the Page class:  
[http://dev.radiantcms.org/radiant/browser/trunk/radiant/app/models/page.rb](http://dev.radiantcms.org/radiant/browser/trunk/radiant/app/models/page.rb)  
,  
and the missing details are in the effective DB schema:  
[http://dev.radiantcms.org/radiant/browser/trunk/radiant/db/schema.rb](http://dev.radiantcms.org/radiant/browser/trunk/radiant/db/schema.rb) .

I find myself looking at the standard tags model:  
[http://dev.radiantcms.org/radiant/browser/trunk/radiant/app/models/standard\_tags.rb](http://dev.radiantcms.org/radiant/browser/trunk/radiant/app/models/standard_tags.rb).  
It’s a great source of inspiration.

/AITOR
