How to show longer traces in Rails TestCases

前端 未结 4 2332
走了就别回头了
走了就别回头了 2021-02-15 17:19

Is there a config variable to set, or some other way to get Rails ActiveSupport::TestCase to show more than one trace line? It is really hard to de

4条回答
  •  深忆病人
    2021-02-15 18:00

    See whether you haven't a file config/initializers/backtrace_silencers.rb

    It says:

    # You can also remove all the silencers if you're trying to debug
    # a problem that might stem from framework code.
    Rails.backtrace_cleaner.remove_silencers!
    

    You can also call remove_filters! if the first was not enough, but filters only make the paths shorter, while silencers do remove some lines from the backtrace.

    You may find the source code in railties/lib/rails/backtrace_cleaner.rb and activesupport/lib/active_support/backtrace_cleaner.rb useful.

提交回复
热议问题