What is the best way to troubleshoot ECMA script in the data mapping

The generic "failed to evaluate" provides no clues as to why it did not
work. I have turned up various debugging but am not getting any where.

What I need to do is print out vars in the log file, screen, somewhere so I
can see what it is comparing,

Thank You