|
-
Apr 5th, 2011, 08:21 AM
#1
Catching NullReferenceException
Hello, I'm totally confused about my IDE behavior.
When I debug a program my IDE simply does not catch System.NullReferenceException - execution continues as if there were nothing wrong.
I may sound crazy, but this is a medical fact.
Moreover, when I go to the menu Debug/Exceptions System.NullReferenceException is not even in the list
(Common Language Runtime Exceptions).
I manually add it (there is the Add button) and I put a checkmark in the 'Thrown' and 'User unhandled' column - now IDE catches it, but after I re-load the project the situation re-appears - and NullReferenceException is not on the list again. What may be wrong?
Update:
No, when I step through the code the execution does not continue but exits the current block of code (sub or function). There were no Try...Catch blocks and there is a message: A System.NullReferenceException occured in MSCorlib.dll...
But why doesn't the debugger stop at this line?
Last edited by cicatrix; Apr 5th, 2011 at 09:03 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|