XNA 4.0 Red X Exceptions

So I’m developing a windows application that uses XNA 4.0 embedded in a custom windows control. The main issue I have is when the code inside that embedded control errors out, the windows form and control result in a big red X across the control instead of stopping and going to the debugger so I can find out where the issue is. I’m using Visual Studio 2010 Express since my copy of VS2008 doesn’t work with XNA 4.0 (why do that to us Microsoft?). Anyways…

Information about running XNA in a windows form:

On your keyboard do the key-press combination of:

That opens up the “Exceptions” window. The odd thing is I can’t find the menu item for that window.

In the Exceptions window I have two main checkboxes, but the important one for this issue is:
“Common Language Runtime Exceptions”

Check the box for “thrown” so we can receive internal exceptions. Now instead of getting a big red cross/x on the window’s XNA control, you will be sent to the debugger.

Help Support This Website:

Buying something through these Amazon affiliate links within 24 hours of clicking could help me out at no additional cost to you:
USA, UK, Canada, Germany, Spain, France, and Italy

Direct Donation Links:
Paypal, Buy Me A Coffee, or Ko-Fi

This entry was posted in General, XNA and tagged , , , , , , , . Bookmark the permalink.