I built an application that is handling an error and returning the following error msg:
System.NullReferenceException:
Object reference not set to an instance of an object.
at MyApp.Submit_Click(Object sender,EventArgs e)
I'm not getting any stack trace and I don't see an issue with the exception not being properly thrown.
I have a few questions about how to capture this information:
exception.ToString() which usually gives me the exception, inner exception, and stacktrace in my code. Do I need the .pdb file to get the stack trace, or will the .pdb only get add the line numbers?Thanks for the help!
No, you do not need the pdb to see the stack trace, but you will need it in order to get the line numbers. And, if you have an out of sync version, you may end up reporting incorrect line numbers.
Your error message does show you the stack trace, there just isn't much of one since it is a button click:
at MyApp.Submit_Click(Object sender,EventArgs e)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With