Ok I added 2 global variables (e.g. outside of the function) var STARTX; var STARTY; I then have this in the function: STARTX = iGenerateStart_X; STARTY = iGenerateStart_Y; I then added a watch for both STARTX and STARTY, start in debug mode, step through each line... nothing... it says "Not Available"