Best Debug for Object Reference Error

I know we have all run into this error before and that there are plenty of forum posts about it…but does anyone have a good debug process for it? What are the best steps to determine which argument is being passed in as NULL?

Thanks

@jpreziuso
I assume you are talking about arguments from invoke workflows

  • first round: check argument passings manually on:
  • is there a variable with the same argument name on any scope in XAML where arguments are defined
  • is there a variable with the same argument name on any scope in XAMsL where a relevant invoke is done
  • is the argument assigned and not ommited for receiving (storing out argumens)

This check we do against the call direction for in arguments. Does mean:

  • start with the xaml which is defining the arguments., go to the xaml which directly calls this argument defining XAML and so on till the inital calling xaml doing the first passing for this chain

for out_arguments same analysis is done by starting with xaml which is defining the out arguments, check the receiver xaml etc.

In case you there was no beak in the passing chains do a debug and set breakpoints on the before and after invokes.

With the use of the watch panels you can simulate the calls / in argument passings.
With the use of the local panel you can check the correctly received out arguments after the invoke

3 Likes