kotlin-debug-adapter: Can't debug simple KotlinQuickStart project
Hello,
Thanks for your work on this extension! I am excited to use it. However, I am unable even to get the default KotlinQuickStart project to debug.
The project does successfully build and run from the VS Code terminal:
joesmac:KotlinQuickStart joeblow$ ./gradlew run
> Task :run
Hello world
BUILD SUCCESSFUL in 0s
3 actionable tasks: 2 executed, 1 up-to-date
Great, so then I set up the following .settings/launch.json
(under the same project folder):
{
"version": "0.2.0",
"configurations": [
{
"type": "kotlin",
"request": "launch",
"name": "Kotlin Launch",
"projectRoot": "${workspaceFolder}",
"mainClass": "MainKt"
}
]
}
I am not using a multi-project workspace. This is just a basic single-folder VS Code project (basically just a clone of the KotlinQuickStart sample project).
Btw, I have used VS Code to debug other languages, and am familiar with usage.
Anyway, when I attempt launch the above debug configuration, I always get the following output in the Debug Console:
[INFO] main Connected to client
[INFO] async1 Successfully resolved Gradle dependencies
[INFO] async1 Starting JVM debug session with main class MainKt
[ERROR] async1 Internal error: com.sun.jdi.connect.VMStartException: VM initialization failed
for: /Library/Java/JavaVirtualMachines/jdk-11.0.2.jdk/Contents/Home/bin/java -classpath /Users/
joeblow/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/13.0/
919f0dfe192fb4e063e7dacadee7f8bb9a2672a9/annotations-13.0.jar:/Users/joeblow/.gradle/caches/
modules-2/files-2.1/org.jetbrains.kotlin/kotlin-compiler-embeddable/1.3.11/
a8db6c14f8b8ed74aa11b8379f961587b639c571/kotlin-compiler-embeddable-1.3.11.jar:/Users/joeblow/
.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-reflect/1.3.11/
aae7b33412715e9ed441934c4ffaad1bb80e9d36/kotlin-reflect-1.3.11.jar:/Users/joeblow/.gradle/caches/
modules-2/files-2.1/org.jetbrains.kotlin/kotlin-script-runtime/1.3.11/
1ef3a816aeacb9cd051b3ed37e2abf88910f1503/kotlin-script-runtime-1.3.11.jar:/Users/joeblow/.gradle/
caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-scripting-compiler-embeddable/1.3.11/
d7d145f70c063e3bb2edb41b766971e359155b99/kotlin-scripting-compiler-embeddable-1.3.11.jar:/Users/
joeblow/.gradle/caches/modules-2/files-2.1/junit/junit/4.12/
2973d150c0dc1fefe998f834810d68f278ea58ec/junit-4.12.jar:/Users/joeblow/.gradle/caches/modules-2/
files-2.1/org.hamcrest/hamcrest-core/1.3/42a25dc3219429f0e5d060061f71acb49bf010a0/
hamcrest-core-1.3.jar:/Users/joeblow/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/
kotlin-stdlib/1.3.11/4cbc5922a54376018307a731162ccaf3ef851a39/kotlin-stdlib-1.3.11.jar:/Users/
joeblow/Desktop/HelloKotlin/build/classes/kotlin/main -Xdebug -Xrunjdwp:transport=dt_socket,
address=nfml-joeblowKYG:49412,suspend=y MainKt
Any idea what’s wrong?
Software:
- macOS High Sierra: 10.13.6
- VS Code: 1.32.2
- (VS Code extension) Kotlin Debugger: 0.2.2
- (VS Code extension) Kotlin: 0.1.13
Java:
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 4
- Comments: 16 (2 by maintainers)
I had this same problem, your point about the host name in address not being resolvable was happening for me, so I just added that to hosts file (pointing to 127.0.0.1) which fixed things for me