Tool for an easiery overview of the stacktrace showing the methods content

Hi, I am debugging an app migrating it from 5.1.7 to 5.2.8.1. Part of the stacktrace is show below with each file with each line and method. What I am missing is seeing the content of the method and I am looking for such a tool?

	 26: from /Users/kireto/.rvm/gems/ruby-2.7.6/gems/rack-2.2.4/lib/rack/head.rb:12:in `call'
	 25: from /Users/kireto/.rvm/gems/ruby-2.7.6/gems/rack-2.2.4/lib/rack/conditional_get.rb:40:in `call'
	 24: from /Users/kireto/.rvm/gems/ruby-2.7.6/gems/rack-2.2.4/lib/rack/etag.rb:27:in `call'
	 23: from /Users/kireto/.rvm/gems/ruby-2.7.6/gems/warden-1.2.7/lib/warden/manager.rb:35:in `call'
	 22: from /Users/kireto/.rvm/gems/ruby-2.7.6/gems/warden-1.2.7/lib/warden/manager.rb:35:in `catch'
	 21: from /Users/kireto/.rvm/gems/ruby-2.7.6/gems/warden-1.2.7/lib/warden/manager.rb:36:in `block in call'
	 20: from /Users/kireto/.rvm/gems/ruby-2.7.6/gems/remotipart-1.3.1/lib/remotipart/middleware.rb:32:in `call'
	 19: from /Users/kireto/.rvm/gems/ruby-2.7.6/gems/turnout-0.2.5/lib/rack/turnout.rb:19:in `call'
	 18: from /Users/kireto/.rvm/gems/ruby-2.7.6/gems/actionpack-5.1.7/lib/action_dispatch/routing/route_set.rb:844:in `call'
	 17: from /Users/kireto/.rvm/gems/ruby-2.7.6/gems/actionpack-5.1.7/lib/action_dispatch/journey/router.rb:33:in `serve'
	 16: from /Users/kireto/.rvm/gems/ruby-2.7.6/gems/actionpack-5.1.7/lib/action_dispatch/journey/router.rb:33:in `each'
	 15: from /Users/kireto/.rvm/gems/ruby-2.7.6/gems/actionpack-5.1.7/lib/action_dispatch/journey/router.rb:50:in `block in serve'
	 14: from /Users/kireto/.rvm/gems/ruby-2.7.6/gems/actionpack-5.1.7/lib/action_dispatch/routing/route_set.rb:31:in `serve'
	 13: from /Users/kireto/.rvm/gems/ruby-2.7.6/gems/actionpack-5.1.7/lib/action_dispatch/routing/route_set.rb:49:in `dispatch'
	 12: from /Users/kireto/.rvm/gems/ruby-2.7.6/gems/actionpack-5.1.7/lib/action_controller/metal.rb:253:in `dispatch'
	 11: from /Users/kireto/.rvm/gems/ruby-2.7.6/gems/actionpack-5.1.7/lib/action_controller/metal.rb:189:in `dispatch'
	 10: from /Users/kireto/.rvm/gems/ruby-2.7.6/gems/actionview-5.1.7/lib/action_view/rendering.rb:30:in `process'
	  9: from /Users/kireto/.rvm/gems/ruby-2.7.6/gems/actionpack-5.1.7/lib/abstract_controller/base.rb:124:in `process'
	  8: from /Users/kireto/.rvm/gems/ruby-2.7.6/gems/activerecord-5.1.7/lib/active_record/railties/controller_runtime.rb:22:in `process_action'
	  7: from /Users/kireto/.rvm/gems/ruby-2.7.6/gems/actionpack-5.1.7/lib/action_controller/metal/params_wrapper.rb:235:in `process_action'
	  6: from /Users/kireto/.rvm/gems/ruby-2.7.6/gems/actionpack-5.1.7/lib/action_controller/metal/params_wrapper.rb:286:in `_wrapper_enabled?'
	  5: from /Users/kireto/.rvm/gems/ruby-2.7.6/gems/actionpack-5.1.7/lib/action_dispatch/http/request.rb:360:in `POST'
	  4: from /Users/kireto/.rvm/gems/ruby-2.7.6/gems/rack-2.2.4/lib/rack/request.rb:69:in `fetch_header'
	  3: from /Users/kireto/.rvm/gems/ruby-2.7.6/gems/rack-2.2.4/lib/rack/request.rb:69:in `fetch'
	  2: from /Users/kireto/.rvm/gems/ruby-2.7.6/gems/actionpack-5.1.7/lib/action_dispatch/http/request.rb:361:in `block in POST'
	  1: from /Users/kireto/.rvm/gems/ruby-2.7.6/gems/actionpack-5.1.7/lib/action_dispatch/http/parameters.rb:110:in `parse_formatted_parameters'

So below 26: from /Users/kireto/.rvm/gems/ruby-2.7.6/gems/rack-2.2.4/lib/rack/head.rb:12:in `call’ I will have the contents of the method like

# 26: from /Users/kireto/.rvm/gems/ruby-2.7.6/gems/rack-2.2.4/lib/rack/head.rb:12:in `call'
    def call(env)
      status, headers, body = @app.call(env)

      if env[REQUEST_METHOD] == HEAD
        [
          status, headers, Rack::BodyProxy.new([]) do
            body.close if body.respond_to? :close
          end
        ]
      else
        [status, headers, body]
      end
    end

#  25: from /Users/kireto/.rvm/gems/ruby-2.7.6/gems/rack-2.2.4/lib/rack/conditional_get.rb:40:in `call'

    def call(env)
      case env[REQUEST_METHOD]
      when "GET", "HEAD"
        status, headers, body = @app.call(env)
        headers = Utils::HeaderHash[headers]
        if status == 200 && fresh?(env, headers)
          status = 304
          headers.delete(CONTENT_TYPE)
          headers.delete(CONTENT_LENGTH)
          original_body = body
          body = Rack::BodyProxy.new([]) do
            original_body.close if original_body.respond_to?(:close)
          end
        end
        [status, headers, body]
      else
        @app.call(env)
      end
    end
...
and so on.

And I would like to have such a stacktrace. It makes it easier to understand the code and what’s happening and who’s calling who and why.

Do you know of a such tool? Thanks