Java-Debug is not always conforming the Debugger Adapter Protocol
まだ誰も着手していません。
評価
調査の方向性
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時間
- マージ済み PR(30日)
- 4
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 1週間以上 初心者へのやさしさ 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
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
elastic/gradle-plugins#157 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
cryptomator/hub#497 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
johanhaleby/occurrent#1120 ·