Debugging 如何在IDE Intellij中调试Kolin Vertex web应用程序?

Debugging 如何在IDE Intellij中调试Kolin Vertex web应用程序?,debugging,web,intellij-idea,kotlin,vert.x,Debugging,Web,Intellij Idea,Kotlin,Vert.x,我已经创建了一个Kotlin Vertex web应用程序,它与Gradle一起运行。但是当我试图通过运行Intellij调试配置来调试它时,断点并没有命中。如何使这些断点工作 buildscript{ 分机{ kotlinVersion='1.2.60' } 存储库{ mavenCentral() } 依赖关系{ classpath“org.jetbrains.kotlin:kotlin gradle plugin:$kotlinVersion” } } 插件{ id‘java’ id“应用

我已经创建了一个Kotlin Vertex web应用程序,它与Gradle一起运行。但是当我试图通过运行Intellij调试配置来调试它时,断点并没有命中。如何使这些断点工作

buildscript{
分机{
kotlinVersion='1.2.60'
}
存储库{
mavenCentral()
}
依赖关系{
classpath“org.jetbrains.kotlin:kotlin gradle plugin:$kotlinVersion”
}
}
插件{
id‘java’
id“应用程序”
id为'com.github.johnrengelman.shadow'版本'2.0.4'
id“org.jetbrains.kotlin.jvm”版本“1.3.11”
“杰科科”
id“de.jansauer.printcoverage”版本“2.0.0”}
杰科科{
toolVersion='0.8.2'
}
JacoCoTestCoverage验证{
违反规则{
统治{
极限{
最小值=0.1
}
}
}
}
jacocoTestReport{
报告{
启用csv.true
启用xml.true
html{
启用真
目标文件($buildDir/reports/jacoco)
}
}
执行数据(测试)
}
tasks.build.dependsOn(jacocoTestReport)
印刷覆盖率{
coverageType='INSTRUCTION'
}
应用插件:“kotlin”
分机{
kotlinVersion='1.2.60'
vertxVersion='3.6.2'
junitJupiterEngineVersion='5.2.0'
}
存储库{
mavenLocal()
jcenter()
}
“com.joyfullyell”组
版本“1.0-SNAPSHOT”
sourceCompatibility='1.8'
mainClassName='io.vertx.core.Launcher'
def mainVerticleName='io.vertx.starter.MainVerticle'
def watchForChange='src/***'
def doOnChange=“./gradlew类”
依赖关系{
编译“org.jetbrains.kotlin:kotlin-stdlib-jdk8”
编译“io.vertx:vertxcore:$vertxVersion”
编译“io.vertx:vertxweb:$vertxVersion”
编译“io.vertx:vertxlang kotlin:$vertxVersion”
编译“io.vertx:vertxmongo客户端:$vertxVersion”
实现“org.kodein.di:kodein di generic jvm:6.0.1”
编译“com.fasterxml.jackson.module:jackson模块kotlin:2.9.+”
编译'com.beust:klaxon:5.0.3'
实现“org.jetbrains.kotlinx:kotlinx协同程序核心:1.1.0”
测试实现“io.vertx:vertx-junit5:$vertxVersion”
testRuntime(“org.junit.jupiter:junit-jupiter引擎:$junitJupiterEngineVersion”)
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile){
科特洛普斯酒店{
jvmTarget=“1.8”
}
}
暗影罐{
分类器='fat'
显示{
属性“Main Verticle”:mainVerticleName
}
合并服务文件{
包括“META-INF/services/io.vertx.core.spi.VerticleFactory”
}
}
试验{
useJUnitPlatform()
测试记录{
事件“已通过”、“失败”、“跳过”
}
报告{
junitXml.enabled=true
html.enabled=true
}
杰科科{
append=false
destinationFile=file($buildDir/jacoco/jacotest.exec)
classDumpDir=file($buildDir/jacoco/classpathdumps)
}
}
跑{
args=['run',mainVerticleName,
“--重新部署=$watchForChange”,
“--启动器类=$mainClassName”,
“--重新部署时=$doOnChange”
]
}
任务包装器(类型:包装器){
gradleVersion='5.0'

}
通过如下配置Gradle,您应该能够很好地运行调试:

点击调试按钮。使用您的配置对其进行了测试

只需确保在
build.gradle
中指定了正确的垂直名称:

def mainVerticleName='io.vertx.starter.MainVerticle'