1

I'm currently setting up an Acceleo project to generate Java source code from an Eclipse UML2 model. I do have experiences with the Xtend code generator, but not with the Acceleo one. However, I wanted to try Acceleo as an alternative to Xtend.

Unfortunately, I do have problems with debugging the M2T transformation from within the MTL template file. All breakpoints I set in the MTL are just ignored and the debugger runs the transformation without stopping.

I've searched Stackoverflow and other sources for help, but none of the responses helped me to get the debugger to work.

I'm running the transformation as an Acceleo Application and am using the Java Application runner since the Acceleo Plug-in Application is no longer supported with Eclipse Oxygen.

Did anyone of you have similar troubles and/or found any solution?

Thanks for any hint.

Best regards Timo Rohrberg

Timo Rohrberg
  • 51
  • 1
  • 4

2 Answers2

0

I have the same requirement, but apparently there is not way to debug it at runtime, as far as I know. https://www.eclipse.org/forums/index.php?t=msg&th=1080008&goto=1740153&#msg_1740153

Create a wrapper service for java printing/logging. This is not the best solution, but, I was able to make do.

You could also use the acceleo interpreter (using the acceleo eclipse perspective) to try and evaluate queries before changing your code. https://wiki.eclipse.org/Acceleo/Interpreter

I use this with papyrus and it works nicely.

theffect
  • 1
  • 2
0

I found a solution (or workaround) to debug .mtl files.

In the manifest editor window of your eclipse plugin

-on the runtime tab add your bin folder (the folder containing the compiled .class and .emtl files) to the classpath.

After this your breakpoints in the .mtl files will work, if you run your Acceleo launcher in "Acceleo Plug-in Application" mode. (Configuration section in the Acceleo launcher window)

(Tested with Eclipse 19-03, Acceleo 3.7)