
I have to debug a big messy C# tool which I didn’t write, that parses an Excel file in a specific format (containing exotic data in quantity).
The run of the tool lasts for about 15 minutes and produces an error report (thousands of entries in general). Trouble is that the coder has used exceptions everywhere for his “error reporting”, and I need to find a few null pointer exceptions that occur about 2% of the time. I’m not even talking about all the catching, grouping, rethrowing which is bad practice in my understanding, both in terms of consistency and rapidity of execution.
Is there a way to only break on Null Pointer Exceptions in Visual Studio (2008) or at least a trick to filter most exceptions ? Breaking on all exceptions is not an option here.
In Visual Studio, under Debug -> Exceptions, you can specify for which exception it should break.
You can find the NullReferenceException under:
CommonLanguage Runtime Exceptions