I'm working with XTemplates and they are proving hard to debug, specially with the conditional operators etc. To give an example, I was trying something with the for construct and I kept getting non-helpful exceptions or in some cases it kept failing silently (nothing got printed). I'm sure the issue was with my code and I later worked around it with the switch construct.
What is the best way to debug XTemplates? Can I see the generated code to help get some hints about where I may be going wrong? Will something like Illuminations help?
The text of an XTemplate gets translated into a function, so the best way to see if that is what you had hoped is to step into the apply or applyOut method and then into the call to the "fn" method it has created.
In Chrome, you can even pretty up the function code, but it is not too far from readable without assistance.
Feel free to post an example of what you are trying to debug - someone may be able to point out issues on simple inspection.