If I understand correctly and what you are trying to do is debug some NullReferenceException (s), but you want to temporarily ignore others during debugging, you can do this by marking the functions that you want the debugger to ignore DebuggerNonUserCode .
[DebuggerNonUserCode]
private void MyMethod()
{
}
NOTE that this will only work if exceptions are found in the specified methods. They just wonβt make the debugger break if you have a debugger that will always throw exceptions NullReferenceException. And that this only works on methods, and not on arbitrary sections of code inside a method.
source
share