how do you debug a material instance

Yes, as in the very first post.

how do you set variables in materials

Right click a scalar / vector / texture sample and convert:

Or right click in the graph and search for a parameter.