我刚刚开始学习Xtend(http://xtend-lang.org/)并尝试使用标准存储库中的Xtext / Xtend 2.10.0插件基于Gradle项目在IntelliJ 2016中编写一个小应用程序。问题是我无法调试我的Xtend代码。尽管Java代码的调试工作,但断点都被忽略了。调试Xtend代码仅在我使用IntelliJ向导并在不使用Gradle的情况下创建标准IntelliJ项目时才有效。我不知道如何解决这个问题?我错过了什么吗?调试在Gradle项目中的工作方式是否有所不同?
这是我的Gradle文件:
group 'GradleXtend'
version '1.0-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'org.xtext.xtend'
sourceCompatibility = 1.5
repositories {
jcenter()
mavenCentral()
}
dependencies {
compile 'org.eclipse.xtend:org.eclipse.xtend.lib:2.10.0'
testCompile group: 'junit', name: 'junit', version: '4.11'
}
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.xtext:xtext-gradle-plugin:1.0.12'
}
}
xtend {
debugger {
//how to install debug info into generated Java code
//SMAP adds Xtend debug info on top of Java
//PRIMARY makes Xtend the only debug info (throws away Java line numbers)
//default is SMAP for Java projects and PRIMARY for Android
sourceInstaller = 'SMAP' //or 'PRIMARY' or 'NONE'
//whether to hide synthetic variables in the debugger
hideSyntheticVariables = false
}
}
我的Xtend文件:
package HelloWorld
class HelloWorld2 {
def static void main(String[] args) {
println("Hello")
}
}