fwcd / fwcd/kotlin-debug-adapter
Incorrect classPath is used to launch debuggee
- Dominant language
- Kotlin
- Stars
- 150
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
Possibly relates to #69
I stumbled upon similar issue while I was trying to launch a Ktor application.
After some debugging, I traced the root cause to the fact that DebugAdapter re-uses classPath discovery mechanism of [kotlin-language-server](https://github.com/fwcd/kotlin-language-server/blob/main/shared/src/main/resources/projectClassPathFinder.gradle) and by default it only takes into account `compileClasspath` while it should use `runtimeClasspath`
For me, the issue was fixed after I've build my own debugAdapter with modified KLS with `it.compileClasspath.forEach` replaced with `it.runtimeClasspath.forEach`.
@fwcd can you please shed some light on the reason why debug adapter launches a "debuggee" with it's compile time dependencies and not runtimeDependencies ? I might be able to contribute if I understand the context better.
Sorry for the ping, and thanks for the great work you did!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.