Debugging Xtend code

The Java code generated by Xtend is clean and easy to debug. However, it is also possible to debug Xtend code directly (instead of the generated Java), thanks to the complete integration of Xtend with the Eclipse JDT debugger.

This means that you can start debugging a Java application that at some point invokes Java code that has been generated by Xtend and, stepping through that, automatically brings you to debugging the original Xtend source. The next screenshot shows a debugging session of Xtend code. Note that all the JDT debugger views are available; furthermore, implicit variables such as it can be inspected in the Variables view:

You can also debug an Xtend file (for example, containing a main method) directly, since ...

Get Implementing Domain-Specific Languages with Xtext and Xtend now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.