Skip to content

codegram/trace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Trace Ruby method calls inside a block of code

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages