Is there any way to find out which object caused the NullReferenceException?

后端 未结 3 1569
独厮守ぢ
独厮守ぢ 2021-01-12 13:14

Is there any way to find the object name that caused the control to flow into the catch block from a NullReferenceException, so that we can easily debug by giving an alert o

3条回答
  •  再見小時候
    2021-01-12 13:46

    Well you can look at the stack trace, reflect the function, and display the parameters and have a guess based on stack state, but I'd say not really as the object could be anywhere in the function.

提交回复
热议问题