I'm currently working on a page which makes use of the MS Ajax UpdatePanel. However I've run into a strange problem. If I simply compile and view my page, one of the button click events results in an error. However, because the button affects items inside an UpdatePanel the actual exception is hidden from me: all I'm getting is a HTTP 500 error returned to me through the UpdatePanel Javascript.

What's odd about this is that if I step through the code line by line in Visual Studio, I don't get the error. The button doesn't cause the behaviour I'm expecting, but it throws no errors. 

Because the step through isn't causing an error to be thrown, I'm at a loss how I can get to the actual exception message so I can find out where the error is being thrown and debug it. Suggestions gratefully received.

Cheers,
Matt