Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Trace Ruby method calls inside a block of code
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
Readme.md
trace.gemspec
trace.rb

Readme.md

trace

Trace uses #set_trace_func to trace Ruby method calls.

Installing

In your Gemfile:

gem 'trace'

Usage:

In your code:

require 'trace'

def foo(val)
  bar(val + 1)
end

def bar(val)
  val
end

trace do
  foo(2)
end

The output will be like this:

[TRACE] hey.rb:3 Object#foo
[TRACE] hey.rb:7 Object#bar

License

Released under the MIT License. Copyright 2011 Codegram Technologies

Something went wrong with that request. Please try again.