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.