Generally, use the "Break on Error" checkbox.
Errors inside glBegin are a special case, though. You need to audit your usage of glBegin, and understand what is not legal.


Your pixel format...