<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>scattrbrain: Debugging Rails</title>
    <link>http://scattrbrain.com/articles/2007/09/22/debugging-rails</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Darshan Patil's personal blog</description>
    <item>
      <title>Debugging Rails</title>
      <description>&lt;p&gt;script/breakpointer does not work anymore with the latest stable version of rails. The new way to debug rails applications is to use ruby-debug. To use this to debug your rails applications, do the following&lt;/p&gt;


&lt;pre&gt;
gem install ruby-debug
&lt;/pre&gt;

	&lt;p&gt;Once, that is done, edit config/environments/development.rb in your rails application and add the following line to the end of the file.&lt;/p&gt;


&lt;pre&gt;
require 'ruby-debug' 
&lt;/pre&gt;

	&lt;p&gt;To break into the debugger, you need to call&lt;/p&gt;


&lt;pre&gt;
debugger()
&lt;/pre&gt;

	&lt;p&gt;where you would have previously called breakpoint(). When debugger() is executed, the server will break into the debugger. Run &lt;b&gt;help&lt;/b&gt; to see a list of available commands. You can also launch an irb process by typing &lt;b&gt;irb&lt;/b&gt; at the debugger prompt.&lt;/p&gt;


	&lt;p&gt;Note:
Debugger does not work with fastcgi. It works with mongrel and webrick.&lt;/p&gt;</description>
      <pubDate>Sat, 22 Sep 2007 15:40:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:9fd65c2b-6358-4cea-9b23-d95fe01dfdec</guid>
      <author>dapatil@scattrbrain.com (Darshan Patil)</author>
      <link>http://scattrbrain.com/articles/2007/09/22/debugging-rails</link>
      <category>Ruby</category>
      <category>ruby</category>
      <trackback:ping>http://scattrbrain.com/articles/trackback/196</trackback:ping>
    </item>
  </channel>
</rss>
