Q:

Trace the code in Ruby?

Is there a good way to run a script and see all the steps:

Which code is executed
Which file the code is in
What it returns
The error messages

This would be a good way to learn how an open source project is working.
Aren't there solutions like this for Ruby?
Eg.
require "httparty"
HTTParty.get "http://www.google.se"

Then it would run the code and show me all the code it is executing, in which file and line, returned objects, error messages etc.

A:

Tracer might do it for you http://en.wikibooks.org/wiki/Ruby_Programming/Standard_Library/Tracer
if you want to just see exceptions raised, then run ruby -d (or use ruby-debug and "Catch" Exception)

