我想使用VSCode调试我的Scala应用程序。
我的Gradle运行任务看起来很简单:
task run(type: JavaExec, dependsOn: build) {
debug true
main = mainClassFile
classpath sourceSets.main.runtimeClasspath
classpath configurations.runtime
}
启动项:
{
"type": "java",
"name": "Debug (Attach)",
"request": "attach",
"hostName": "localhost",
"port": 5005
}
现在当我启动调试器时,它会等待vscode客户端。但是我无法在vscode中设置任何断点,以停止调试器。暂时运行直到vscode连接后结束。
我正在使用Scala和Scala语言服务器。
有人知道如何添加断点吗?