fwcd / kotlin-debug-adapter

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

Internal error when execute debugging #51

Open Anlarry opened 3 years ago

Anlarry commented 3 years ago

When I execute debugging, an internal error occur. And in debug console, it says,

[INFO] main      Connected to client
[INFO] async1    Could not resolve kotlin-stdlib using Maven: null
[INFO] async1    Could not resolve kotlin-stdlib using Gradle: C:\Users\xxx\.gradle\caches
[INFO] async1    Could not resolve kotlin-stdlib using Maven: null
[INFO] async1    Could not resolve kotlin-stdlib using Gradle: C:\Users\xxx\.gradle\caches
[INFO] async1    Starting JVM debug session with main class main
[ERROR] async1    Internal error: java.lang.UnsupportedOperationException: Empty collection can't be reduced.
[ERROR] java.util.concurrent.CompletionException: java.lang.UnsupportedOperationException: Empty collection can't be reduced.
[ERROR]     at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
[ERROR]     at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
[ERROR]     at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1810)
[ERROR]     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[ERROR]     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[ERROR]     at java.base/java.lang.Thread.run(Thread.java:830)
[ERROR] Caused by: java.lang.UnsupportedOperationException: Empty collection can't be reduced.
[ERROR]     at org.javacs.ktda.jdi.launch.JDILauncher.formatClasspath(JDILauncher.kt:119)
[ERROR]     at org.javacs.ktda.jdi.launch.JDILauncher.formatOptions(JDILauncher.kt:88)
[ERROR]     at org.javacs.ktda.jdi.launch.JDILauncher.createLaunchArgs(JDILauncher.kt:58)
[ERROR]     at org.javacs.ktda.jdi.launch.JDILauncher.launch(JDILauncher.kt:37)
[ERROR]     at org.javacs.ktda.jdi.launch.JDILauncher.launch(JDILauncher.kt:24)
[ERROR]     at org.javacs.ktda.adapter.KotlinDebugAdapter$launch$1.invoke(KotlinDebugAdapter.kt:111)
[ERROR]     at org.javacs.ktda.adapter.KotlinDebugAdapter$launch$1.invoke(KotlinDebugAdapter.kt:37)
[ERROR]     at org.javacs.kt.util.AsyncExecutorKt$sam$java_lang_Runnable$0.run(AsyncExecutor.kt)
[ERROR]     at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1807)
[ERROR]     ... 3 more

and my launch.json

"version": "0.2.0",
    "configurations": [
        {
            "type": "kotlin",
            "request": "launch",
            "name": "Kotlin Launch",
            "projectRoot": "${workspaceFolder}",
            "mainClass": "main"
        }
    ]
bmsan commented 2 years ago

I am getting the same error.

donaina commented 9 months ago

has anyone been able to get this resolved?