The Exception#cause method has been added to Ruby 2.1.0 back in 2013. Since then Rails has adopted it to replace the #original_exception method in a few classes such as the ActiveSupport::Rescuable, and I believe we could take a step further to help debug an app in development. One low-hanging fruit that I see is to add the ability to show causes in the DebugExceptions view. I have made a proof-of-concept implementation to see if it could be really useful. Here is a screenshot of what it looks like:
The code could be found here: https://github.com/rails/rails/compare/master...yuki24:show-cause-on-debug-view
Of course, there is going to be more things to take care of, such as implementing more frontend features and updating how a TemplateError (which already uses #cause) could be shown, but I wanted to get feedback (especially on the visual aspect of the PoC) before I invest more time in it.
Let me know what you all think.