In 2010, you have 2 places to switch on the debug mode.
First place is same as 2007,we would go into IIS, find our virtual directory and change the CallStack from false to true and the customErrors mode from On to Off. (reference)
However, that doesn’t seem to work for SharePoint 2010. I made those changes and I still got that annoying generic error message. As it turns out, SharePoint 2010 has a second web.config file located:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\web.config
That second web.config file contains the customErrors section that needs to be set to Off.
Central Administration has a second web.config file too if you need to see error descriptions their:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\ADMIN\web.config