Allow resolving the source location of stack frames as needed
@roblourens ya está trabajando en esto.
Desde el 26/6/2023.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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
- Lenguaje dominante
- HTML
- Estrellas
- 1.8k
- Forks
- 173
- Merge medio
- 7 d 7 h
- PR fusionados (30 d)
- 2
Preparar el entorno
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/debug-adapter-protocol
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
microsoft/debug-adapter-protocol#633 · 1 comentario ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
microsoft/debug-adapter-protocol#599 · 8 reacciones ·
-
under-discussion
Dificultad 2/5 1-3 horas Aptitud para principiantes 48/100
microsoft/debug-adapter-protocol#596 · 9 comentarios ·