The best advice I can give is to extract the code from the macro, set the macro variables manually and let the steps run one by one.
It's best to do the "macro-izing" of code after the steps work on their own.
Also add %put statements in the macro to help identify which macro iteration (if you have such) leads to the crash, if you can't test it manually owing to too many iterations.
... View more