Skip to Content

Get stack trace object in Ruby

Posted on

When we debug Ruby code, it’s better if we know full stack trace, understand which methods our code really call.

In Ruby, if we set break point (using pry gem: binding.pry), we can call this command in console:

Thread.current.backtrace.join("\n")

Reference

comments powered by Disqus