How do I know what the exception originally caused if it was selected from Microsoft code?

I have two controls containing a DataGridView in different panels in a DockPanel . If someone is in edit mode and I switch the panel, I get a NullReferenceException coming from the DataGridView EndEdit() method. The stack trace does not go deeper than this, and the exception does not contain any information.

I looked at this method in the reflector and I don't see anything explicitly null. I suspect the problem is actually in my code, but the exception is returned from the Microsoft code and overwrites the stack trace. How to find out what caused the exception initially?

+4
source share
3 answers

If you suspect an error in the MS code, can you download debugging symbols from the symbol server, download them and trace them through debug? Like so .

Please note that symbols are subject to one of the various licenses. This may affect you if (for example) you are working on mono deposits, etc.

+5
source

Have you examined the InnerException property?

+1
source

Follow the instructions to configure the message server and source server 1 . Install a debugger so that it throws a NullReferenceException. Then either you get the full source code for debugging, or at least the full stack trace.

1 Note. The QFE list is included in SP1.

+1
source

All Articles