See this post. This was the test macro for the #VB option. The two macros do exactly the same, but M20910 is written in C#, M20912 is in VB.
My version checks all the axes that are in the homing sequence and have Home input pin. You don't have to care about the home offset. The results are pinted in units and steps. You don't need to home the axes before running, so you can even check how much your machine moves when powered off.