So is there anything you hate more than the old "Unknown Error" when you're doing Sharepoint development? I found this tip on Madhur Ahuja's old blog (he moved it earlier this year) and it's short enough I can paste it here:
Find the web.config for the site you normally use as your development site. Locate this tag:
<SafeMode ... CallStack="false">and change it to CallStack="true".
<compilation debug="false" batch="false">to
<compilation debug="true" batch="true">
Now you will get the full stack trace as soon as the error is raised.
Works like a charm! Well done Madhur, and thankyou!