Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Allow resolving the source location of stack frames as needed

未关闭
#407 12 条评论 4 个 reaction 已指派 1 人 在 GitHub 查看

@roblourens 已经在做这个了。

开始于 2023年6月26日。

评估

这个 Issue 还没有评估数据。

描述

feature-request

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 小时
30 天内合并 PR
2

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/debug-adapter-protocol 的其他 Issue

查看 microsoft/debug-adapter-protocol 的全部 Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。