Forum: Ruby on Rails debugging

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B3d3e763b80f4bbabadde8fe207e0d4f?d=identicon&s=25 William Langshaw (Guest)
on 2006-06-12 06:52
(Received via mailing list)
Hello-

If I am in the middle of a method in an ActiveRecord object or a
controller how can I just print something out to the screen and either
keep going or exit immediately?

If I am in a controller I can just generate some text and:

render :text => "my debug output"

But it would be nice to print something out to the output buffer and
then continue on. Additionally, if I am inside an ActiveRecord, I just
want to print something out and just die. In PHP I would just do a
print_r() on some data and then call die(). Is there similar "ghetto"
debugging facilities availabe?

Thanks!
B84d42a3a5c343f8fc6ab7d7f47fd3f5?d=identicon&s=25 Robby Russell (Guest)
on 2006-06-12 07:30
(Received via mailing list)
On Jun 11, 2006, at 9:50 PM, William Langshaw wrote:

> But it would be nice to print something out to the output buffer and
> then continue on. Additionally, if I am inside an ActiveRecord, I just
> want to print something out and just die. In PHP I would just do a
> print_r() on some data and then call die(). Is there similar "ghetto"
> debugging facilities availabe?
>
> Thanks!

breakpoint is your friend...


--
Robby Russell
Founder & Executive Director

PLANET ARGON, LLC
Ruby on Rails Development, Consulting & Hosting

www.planetargon.com
www.robbyonrails.com

+1 503 445 2457
+1 877 55 ARGON [toll free]
+1 815 642 4068 [fax]
This topic is locked and can not be replied to.