Java-Debug is not always conforming the Debugger Adapter Protocol
還沒有人認領這個 Issue。
評估
研究方向
先從經過 JsonUtils.java、AbstractProtocolServer.java 和 ProtocolServer.java 的協定路徑開始,然後重現帶有 null 引數的請求以及重複的 threads 請求。檢查 DAP threads 回應,以及對使用 jdt:// URI 傳回的類別進行的來源處理。當 null 引數不再拋出例外、threads 回應包含 threads,且非專案類別在 source 請求中使用 sourceReference 時,即表示完成。
由索引模型根據 Issue 內容生成。
描述
-
Commands that have
argumentsset tonullthrow an exception:jdtls: 08.03.2021, 23:12:44 Error parsing message: com.google.gson.JsonSyntaxException: Expected a com.google.gson.JsonObject but was com.google.gson.JsonNull Expected a com.google.gson.JsonObject but was com.google.gson.JsonNull com.google.gson.JsonSyntaxException: Expected a com.google.gson.JsonObject but was com.google.gson.JsonNull at com.google.gson.internal.bind.TypeAdapters$35$1.read(TypeAdapters.java:897) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222) at com.google.gson.Gson.fromJson(Gson.java:932) at com.google.gson.Gson.fromJson(Gson.java:897) at com.google.gson.Gson.fromJson(Gson.java:846) at com.google.gson.Gson.fromJson(Gson.java:817) at com.microsoft.java.debug.core.protocol.JsonUtils.fromJson(JsonUtils.java:26) at com.microsoft.java.debug.core.protocol.AbstractProtocolServer.processData(AbstractProtocolServer.java:219) at com.microsoft.java.debug.core.protocol.AbstractProtocolServer.run(AbstractProtocolServer.java:98) at com.microsoft.java.debug.core.adapter.ProtocolServer.run(ProtocolServer.java:61) at com.microsoft.java.debug.plugin.internal.JavaDebugServer$2.run(JavaDebugServer.java:136) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) at java.base/java.lang.Thread.run(Thread.java:832)However, commands that do not need arguments, e.g. (
configurationDone,threads) should be able to set arguments tonullas the Thread Request does not set any restrictions. See here. -
The response to
threadsrequest does not always contain thethreadskey.
Protocol:⟸ request/threads(8) :: {} ⟸ request/threads(9) :: {} ⟸ request/threads(10) :: {} ⟸ request/threads(11) :: {} ⟸ request/threads(12) :: {} ⟸ request/threads(13) :: {} ⟹ response/threads(8) :: None ⟹ response/threads(9) :: None ⟹ response/threads(10) :: None ⟹ response/threads(11) :: None ⟹ response/threads(12) :: None ⟹ response/threads(13) :: NoneSee here.
-
When stepping into classes that are not represented by a project file, Java-Debug returns a path with URI scheme
jdt://which then can be used to retrieve the class content using thejava/classFileContentsLSP request. Java-Debug should instead set the sourceReference value > 0 and the contents of the source must be retrieved through thesourcerequest (See https://github.com/microsoft/java-debug/issues/259#issuecomment-695097967).
This requires a special workaround in https://github.com/daveleroy/sublime_debugger/pull/106.
- 主要語言
- Java
- 星號
- 409
- 分支
- 204
- 平均合併
- 1 天 13 小時
- 30 天內合併 PR
- 4
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
microsoft/java-debug 的其他 Issue
-
ai-triaged bug
難度 4/5 3-5 天 新手友好度 35/100
microsoft/java-debug#611 · 2 則留言 ·
-
ai-triaged enhancement
難度 4/5 3-5 天 新手友好度 35/100
microsoft/java-debug#608 · 3 則留言 ·
-
ai-triaged question
難度 5/5 一週以上 新手友好度 30/100
microsoft/java-debug#597 · 1 則留言 ·
-
ai-triaged bug
難度 4/5 3-5 天 新手友好度 25/100
microsoft/java-debug#588 · 1 則留言 ·
-
ai-triaged question
難度 2/5 1-3 小時 新手友好度 35/100
microsoft/java-debug#582 · 1 則留言 ·
查看 microsoft/java-debug 的全部 Issue
相似的 Issue
-
Bug Java Platform: Java
難度 2/5 1-3 小時 新手友好度 78/100
getsentry/sentry-java#6138 · 1 則留言 ·
-
bug needs triage p2
難度 2/5 1-3 小時 新手友好度 78/100
GoogleCloudPlatform/DataflowTemplates#4273 · 1 則留言 ·
-
[Studio][Bug] Bulk-deleting a full page of alert rules steps the page back while more rules remain 未關閉
難度 2/5 1-3 小時 新手友好度 78/100
apache/rocketmq-dashboard#4654 · 1 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 78/100
-
難度 2/5 1-3 小時 新手友好度 76/100