It is some time ago that Maurice Prather at BlueDogLimited has posted an article about debugging Web Parts. As he stated debugging Web Parts is not that difficult. In his article he starts with the basics describing the CallStack and customError nodes in the web.config file.
The second part is more advanced and explains why you don't have to set debug="true" and trust level to "Full".
A very important remark which i totally agree with in his article is:
"More importantly, if you’re trying to track down problems associated with code access security, setting the trust level to a higher state simply hides the very same problems you were attempting track down."
http://www.bluedoglimited.com/SharePointThoughts/ViewPost.aspx?ID=60