Allow resolving the source location of stack frames as needed
@roblourens がすでに取り組んでいます。
2023年6月26日 から。
評価
この issue はまだ評価されていません。
説明
Use Case: When the debugger stops at a breakpoint, the DAP requests the stackTrace with the source and line information. This works fine when the source code comes from existing files, but it causes problems when the source code is missing and has to be generated from disassembly tools.
The problem is that the decompiled code has different line numbers than the original source code, which leads to a mismatch when debugging with the decompiled source. The current workaround for the Java debugger is to decompile the sources of all the stack frames of the paused thread before sending them to the client, and to adjust the original line numbers of the stack frames to match the decompiled ones. The drawback of this approach is that it requires decompiling all the stack frames beforehand, which makes the frames request much slower.
Proposal: A possible solution is to add a new DAP request called resolveStackTrace. If a stack frame is marked as resolved, it means that it has the correct source and line information. The client can open and view it as usual. If a stack frame is marked as unresolved, the client has to resolve it first before opening it.
interface StackFrame {
...
/**
* If true, the source and line has been resolved and you can view its source directly.
* Otherwise, the client will send another request to resolve the
* source line first when you opens it.
*/
isResolved: boolean;
}
/**
* Resolve the stack trace information such as source and line.
*/
interface ResolveStackTraceRequest extends Request {
command: 'resolveStackTrace';
arguments: ResolveStackTraceArguments;
}
interface ResolveStackTraceArguments {
frameId: number;
}
interface ResolveStackTraceResponse extends Response {
body: {
stackFrame: StackFrame;
};
}
// cc: @isidorn @akaroml @nickzhums @jdneo
- 主要言語
- HTML
- スター
- 1.8k
- フォーク
- 173
- 平均マージ
- 7日 7時間
- マージ済み PR(30日)
- 2
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/debug-adapter-protocol のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
microsoft/debug-adapter-protocol#633 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
microsoft/debug-adapter-protocol#599 · リアクション 8 件 ·
-
under-discussion
難易度 2/5 1〜3時間 初心者へのやさしさ 48/100
microsoft/debug-adapter-protocol#596 · コメント 9 件 ·