I took over a legacy application and we are updating it piece by piece. However there are a few large blocks of code surrounded by a try catch.
When debugging on occasion we will get a null reference exception. The most generic "Object reference is not set to an instance of an object". This could be anything within 1000s of lines of legacy code.
Is there any possible way to get more detail on the line which this exception occured?
When surrounding in a try catch, the stack trace just points to the line that the exception block starts.
How can I get the exception to show me the exact line where it failed?