fwcd / fwcd/kotlin-debug-adapter

Can't debug simple KotlinQuickStart project

Open
#10 16 comments 4 reactions 0 assignees View on GitHub
bug
Dominant language
Kotlin
Stars
150
Forks
29
PR merge metrics
No merged PRs in 30d

Description

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):

```javascript
{
"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)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure with the KotlinQuickStart project, the shown .settings/launch.json, and the listed macOS, VS Code, Java, and extension versions. Start by comparing the successful ./gradlew run with the Debug Console JVM command and VMStartException. Done means the default single-folder project launches under the Kotlin debug configuration without the initialization error.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.