0.0
No commit activity in last 3 years
No release in over 3 years
Trace the whole chain of method calls.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.7
~> 10.0

Runtime

 Project Readme

TraceCalls

Trace the whole chain of method calls.

Installation

Add this line to your application's Gemfile:

gem 'trace_calls'

And then execute:

$ bundle

Or install it yourself as:

$ gem install trace_calls

Usage

require 'open-uri'
require 'trace_calls'

TraceCalls::on do
  open('http://google.com', proxy: nil)
end

puts TraceCalls::root

The result:

+-Kernel::open
  +-#<Class:URI>::parse called from Kernel::open at 33
  | \-URI::Parser::parse called from #<Class:URI>::parse at 747
  | | +-URI::Parser::split called from URI::Parser::parse at 211
  | | +-#<Class:URI>::scheme_list called from URI::Parser::parse at 213
  | | +-#<Class:URI>::scheme_list called from URI::Parser::parse at 214
  | | \-URI::HTTP::initialize called from URI::Parser::parse at 660
  | | | \-URI::Generic::initialize called from URI::HTTP::initialize at 84
  | | | | +-URI::Generic::set_scheme called from URI::Generic::initialize at 203
  | | | | +-URI::Generic::set_userinfo called from URI::Generic::initialize at 204
  | | | | | \-URI::Generic::split_userinfo called from URI::Generic::set_userinfo at 525
...

If you want full details, i.e. with the filepath and line, you can use

puts TraceCalls::root.to_s(detailed: true)

Contributing

  1. Fork it ( https://github.com/toch/trace_calls/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request