سؤال

I try catch use Exception to get stack trace. Error "Object reference not set to an instance of an object", but when I log file use log4net, I log ex.StackTrace as well, it doesn't show the line of exception.

Do you know why? Regular, it's always show but it's not.

هل كانت مفيدة؟

المحلول

You must have the pdb files if you want to view the lines. Also just doing ToString on the exception should give you the stacktrace.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top