I just added autofresh support for the stacktrace pages, now you get get the benefits of autofresh while you are refactoring your code, which can cause temporary breakage, for example. It was easy, altough not at first easy to find. The answer was found in the comments of actionpack/lib/action_controller/rescue.rb. It bascially said you just need to override the rescue_action_in_public - for "public" errors - and rescue_action_locally - for local errors, which shows the stacktraces. I just copied the existing rescue_action_locally method over and swapped in my template file instead(changed code in orange):
render :text => 'it bombed'
@template.instance_variable_set("@contents", @template.render_file(template_path_for_local_rescue(exception), false))
response.content_type = Mime::HTML
This will tell it to find the layout.erb in my plugin directory instead of the one buried deep inside rails.