Is there a way to step through a Rails app in a debugger?
Is there a way to step through a Rails app in a debugger as it handles a reques开发者_StackOverflowt?
Yes, use pry and pry-debugger. Visit http://pryrepl.org/ for more info.
Yes.
Assuming you've started rails with:
rails s --debugger
and got a line in your code:
debugger
then, when you hit that breakpoint, just press:
Enter
to step through code line-by-line. You will also see Ruby code being executed en route as your app is being parsed. Not sure how you switch that off.
Of course you can. All you have to do is install Netbeans 6.9. It has a fastdebugger inbuilt in it. You should start the server in Debug mode. You can then set breakpoints in your code and step and inspect line by line.
I like the Rubymine debugger. Rubymine is a paid Rails IDE.
精彩评论