As developper you know you have to change certain settings in the web.config to get the actuall error in your SharePoint.

Through code we can manipulate the web.config so why don’t change those settings in a feature ???

Well here it is:

web.config feature