Testing the Logic
You can test the basic behaviour of your Macros inside the code editor. Basic, because some of the more complex functions, such as EvalToken and holidays functions, can only be evaluated at run-time (ie. when generating a diary).
You can however set initial values for all the system variables, and then step through your code while watching the values of all the variables (system and your own) as each line of code is performed. This is usually enough to grasp where you may have made an error in code.