Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Allow resolving the source location of stack frames as needed

Đang mở
#407 12 bình luận 4 reaction 1 người được giao Xem trên GitHub

@roblourens đang làm issue này rồi.

Từ ngày 26/6/2023.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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

Ngôn ngữ chính
HTML
Star
1.8k
Fork
173
Merge trung bình
7 ngày 7 giờ
Pull request đã merge (30 ngày)
2

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/debug-adapter-protocol

Tất cả issue của microsoft/debug-adapter-protocol

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.