I want to debug my scala app with vscode.
My gradle run task looks as simple:
task run(type: JavaExec, dependsOn: build) {
debug true
main = mainClassFile
classpath sourceSets.main.runtimeClasspath
classpath configurations.runtime
}
The launch entry:
{
"type": "java",
"name": "Debug (Attach)",
"request": "attach",
"hostName": "localhost",
"port": 5005
}
Now when I launch the debugger, it waits for the vscode client. But I am not able to set any breakpoints in vscode in order to stop the debugger. For now it runs until the end, after vscode connected.
I am using the Scala
and Scala Language Server
.
Does someone know how to add breakpoints?