fwcd / kotlin-debug-adapter

Kotlin/JVM debugging for any editor/IDE using the Debug Adapter Protocol
MIT License
110 stars 19 forks source link

kotlin multiplatform debugging - paths #52

Closed koush closed 3 years ago

koush commented 3 years ago

Kotlin multiplatform has a slightly different directory output structure that the debug adapter or related extension does not seem to recognize.

For example, moving core/jvm/test/ to the root project core/test/ makes the launch work properly. I'm not sure where to begin to fix this, but diagnosing the issue was easy enough.

Foo_kt_—_scratch

fwcd commented 3 years ago

The issue here is that the Kotlin Debug Adapter currently relies on hardcoded paths, which is obviously not a very robust solution. A possible solution would be to write (and invoke) a Gradle script, like we do to locate dependencies, but for output classes.

-> See #55

koush commented 3 years ago

Alright, I submitted a pull request that should fix it, but unfortunately I was unable to test the resolution. The build instructions seem out of date.

Mac:kotlin-debug-adapter[master]$ ./gradlew :editors:vscode:prepare

FAILURE: Build failed with an exception.

* What went wrong:
Project 'editors' not found in root project 'kotlin-debug-adapter'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 491ms
fwcd commented 3 years ago

I've opened a separate issue for that: #54