Is there a capability to enable some type of system trace once in a method in a Ruby on Rails Controller Class? Having real difficulty locating the source code getting executed.
Best thing is to use the ruby debugger.
Assuming you're using Ruby 1.9.3 (please respond if you're not), you imply do the following:
gem 'debugger'
bundle
after saving debugger
where you want code execution to stop. Not hit your app through the browser and look into where you started the server and you should see the debug prompt.
You may have to start your server in debug mode, which you do as follows:
rails server --debugger
For a lot more information on this and other debugging steps, check out the great Rails Guide - Debugging Rails Applications It's a great introduction to debugging rails apps.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.