How to use installDslAsPrimarySource?
#3436
Replies: 2 comments 3 replies
-
|
It should work with both. I guess you need to debug Java breakpoint handling and source lookup. We had a ton of bugs with absolute relative paths etc .. and jdt might swallow some problems |
Beta Was this translation helpful? Give feedback.
-
|
I fixed the problems with generated absolute paths some time ago, and the paths are relative in the trace files. It's not only that breakpoint is not hit. Even entering a method call corresponding to the DSL file still leads to the generated Java file. The fact that the "show source" context menu shows "jdt" instead of the DSL name? Do you know what that relates to? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I thought I knew how this option was supposed to work, especially by looking at the Javadoc of the maven plugin
I thought this was required if you want to debug your Xbase DSLs.
However, maybe it's required only for proper code coverage? At least, with this option set, the JaCoCo code coverage refers to the original DSL source for coloring.
I seem to understand that in the Xtext code base, we always set that property to false.
Instead, if set, it seems to break debugging.
If the DSL files are in a different project from the one where I debug (e.g., another project in the workspace or a binary dependency, provided with the companion source JAR), the debugger never hits the DSL source file.
I can open the DSL source file by looking for the Java type corresponding to that DSL source file (it correctly opens the DSL source file), but the debugger cannot find it.
The debugger insists on showing the generated Java file.
If I try to use "Show Sources...", the options I have are "Default", "Java", and "jdt". The last one is instead of the name of my DSL.
What is then the proper way to bundle JARs and source JARs so that it is possible to debug DSL source files when they are used as dependencies?
Beta Was this translation helpful? Give feedback.
All reactions