fwcd / fwcd/kotlin-debug-adapter
Attaching to jvm-debugger server started by gradle failing
- Dominant language
- Kotlin
- Stars
- 150
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
I get the following output after trying to attach.
```
[INFO] main Connected to client
[ERROR] async0 Internal error: java.lang.NullPointerException: getName(...) must not be null
[ERROR] java.util.concurrent.CompletionException: java.lang.NullPointerException: getName(...) must not be null
[ERROR] at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
[ERROR] at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
[ERROR] at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1770)
[ERROR] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[ERROR] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[ERROR] at java.base/java.lang.Thread.run(Thread.java:840)
[ERROR] Caused by: java.lang.NullPointerException: getName(...) must not be null
[ERROR] at org.javacs.ktda.adapter.DAPConverter.toInternalSource(DAPConverter.kt:45)
[ERROR] at org.javacs.ktda.adapter.KotlinDebugAdapter$setBreakpoints$1.invoke(KotlinDebugAdapter.kt:264)
[ERROR] at org.javacs.ktda.adapter.KotlinDebugAdapter$setBreakpoints$1.invoke(KotlinDebugAdapter.kt:256)
[ERROR] at org.javacs.kt.util.AsyncExecutor.compute$lambda$2(AsyncExecutor.kt:19)
[ERROR] at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
[ERROR] ... 3 more
[ERROR] async0 Internal error: java.lang.NullPointerException: getName(...) must not be null
[ERROR] java.util.concurrent.CompletionException: java.lang.NullPointerException: getName(...) must not be null
[ERROR] at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
[ERROR] at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
[ERROR] at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1770)
[ERROR] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[ERROR] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[ERROR] at java.base/java.lang.Thread.run(Thread.java:840)
[ERROR] Caused by: java.lang.NullPointerException: getName(...) must not be null
[ERROR] at org.javacs.ktda.adapter.DAPConverter.toInternalSource(DAPConverter.kt:45)
[ERROR] at org.javacs.ktda.adapter.KotlinDebugAdapter$setBreakpoints$1.invoke(KotlinDebugAdapter.kt:264)
[ERROR] at org.javacs.ktda.adapter.KotlinDebugAdapter$setBreakpoints$1.invoke(KotlinDebugAdapter.kt:256)
[ERROR] at org.javacs.kt.util.AsyncExecutor.compute$lambda$2(AsyncExecutor.kt:19)
[ERROR] at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
[ERROR] ... 3 more
* Command "attach" timed out after 10 seconds, the timeout period is configurable with `dape-request-timeout' *
* Request timeout *
[INFO] async1 Waiting for configuration done response for 10 seconds...
```
DAP client config (emacs-dape)
```
(kotlin-debug-adapter
modes (kotlin-mode)
ensure dape-ensure-command
command "kotlin-debug-adapter"
command-cwd dape-command-cwd
;; defer-launch-attach t
command-insert-stderr t
:request "attach"
:type "kotlin"
:hostName "127.0.0.1"
:port 5005
:timeout 20000
:enableJsonLogging t
:jsonLogFile "~/kda.log"
:projectRoot "~/ktapp"
)
```
I set breakpoint beforehands, if that affects anything.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the attach using the Gradle-started server, port 5005, and the supplied emacs-dape configuration with a breakpoint set. Start at DAPConverter.kt:45 and the setBreakpoints path in KotlinDebugAdapter.kt:256-264; done means attaching completes without the null-name error or request timeout.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, kotlin
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100