views:

39

answers:

1

I have got a strange behavior with VS 2008. All exceptions raised during the load event are not shown in the debugger. VS does not stop and the rest of the code (of the load event) is not executed. This only happens in the load event and never happens in the other events where I can go step by step and the window pops up with the exception message. This is not really convenient. Is this normal ? Which parameter do I need to modify to change this?

A: 

I have finally found the answer to this question on the MSDN forum. So in case someone is interested, here is the answer. In order to have VS 2008 stop on the load event during debugging, go to Debug > Exception and check Thrown for Common Language Runtime Exceptions. This way VS 2008 will display the exception window for each line of code during the load event. Apparently the default installation of VS 2008 does not come with this the Common Language Runtime Exception Thrown checked. This differs from VS 2005 and can be misleading since the IDE will stop on any other line of code outside the Load event and does not warn you of the non exceution of the rest of the code.

This will be more useful for others if you say whether you're talking about ASP.NET, Windows Forms, or whatever. Also, post the URL to the MSDN forums post you found.
John Saunders