I have a code which looks like this:
public partical class frmXXX : Form
{
SomeObject foo = null;
public void XYZ()
{
foo.ABC.DEF(foo.XXX, foo.YYY, foo.ZZZ);
somethingElse();
}
...
}
It appears that I had a bug where I called XYZ() when foo is null. The program crashed with a NullReferenceException at the customer, which is what I would expect. However, on my development machine I do not get an Exception. I also verified with the debugger that foo is actually null. The debugger says that it is null.
Once the null object was invoked, the method will end, so somethingElse(); is not called. It is like a silent exception. Is there a chance that my development machine is wrongly configured, or do I enable something?
Cntrl + Alt + E (Or Debug -> Exceptions or in VS2017 Debug -> Windows -> Exception Settings) Select Reset All, this will return the default exceptions.
Also make sure Just My Code is checked. You can find this under Debug -> Options. This will bring you to the Debugger -> General options. Here you can check Just My Code.
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