microsoft / microsoft/vscode-java-debug
[Question] How to develop a vscode plugin to Influence debugging behavior
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 591
- フォーク
- 429
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 19
説明
I have developed a library JAsync to add async/await support to Java. The library converts the await function to a callback at the bytecode level. At least for now, at the level of writing code, with this library, users already have the same experience with async/await as they do with csharp and js. However, during debugging, when the user breaks to the line containing the await, the user expects the code to stop at the next line after executing the next step, but in reality, the code jumps to the inside of the one function that handles callbacks in the JAsync framework. Because the actual code has become a callback, the code on paper is not executed immediately. I want change this behavior. I have tried writing a jvmti agent. But I found breakpoint event is exclusive. Since jdwp has reuqested the breakpoint event right, my agent can't achieve it again. So I decide to develop a plugin of ide to fix it.
Here is my thought.
For example:
var a = someFunc().await(); // line 1
System.out.println(a); // line 2
will be converted to this in byte code:
someFunc().then(a -> { // line 1
System.out.println(a); // line 2
})
If user add a breakpoint to line 1, And the progrem has topped at line 1. In my plugin, I can get report of it, So my plugin will add a breakpoint to real line2 in the lambda method which JAsync generated. When the user press the step over button, my plugin execute continue instead of step over, when the progrem stop at line 2, my plugin will remove the breadpoint.
I came here to ask you guys How can I develop such a plugin that only changes part of the behavior of the current debugging plugin, instead of starting from scratch and writing a new one?
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
リポジトリのファイルもテストも指定されていません。まず、既存の VS Code Java debug adapter における breakpoint と step-over のエントリーポイントを追跡し、ここで説明されている JDWP の breakpoint-event の動作と比較してください。対応している拡張ポイントを特定するか、これには別の debugger implementation が必要であることを文書化できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, typescript, vscode
- 領域
- developer-experience, devtools
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 20/100