Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

SourceRequest: Lazily provide local file path?

Abierto
#189 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Estancado

Línea de trabajo

Comienza revisando las definiciones del protocolo y la semántica de SourceResponse, SourceReference, Source.Path y SourceLoadedEvent. Compara los dos comportamientos propuestos en el issue y determina cuál puede especificarse sin romper los clientes existentes. Se considera completado cuando el cambio del protocolo y sus reglas de capacidades o compatibilidad del cliente estén acordados y documentados.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

*question feature-request

Description

Right now, adapters have two choices when providing a Source object (in stack trace, etc)

  • Provide a local file name that the client can natively open by itself, with Path
  • Provide a SourceReference that the client can then query lazily later

The problem with these 2 choices is that clients treat SourceReference-based files as ephemeral for the current session (aka "scripts"), and breakpoints etc will be discarded by the client when it stops/restarts a debugging session.

The usecase I am trying to address is SourceLink (or equivalent) methods of acquiring files that are permanent and immutable. If the client has something like the Parallel stacks view opened, it would be impractical to go do a billion SourceLink requests just to be able to give valid local paths, and so I use the SourceReference approach. However, the current shape of the SourceResponse is that it gives the raw content of the file, and the client will discard any user state it had for that file on restart.

In these usecases where the lazy files are immutable and permanent, I would like to be able to cache them to some adapter-defined arbitrary location and tell the client that the file now has a path as part of a SourceResponse.

Question / feature

This would technically be implementable today by clients if the adapter sends a SourceLoadedEvent alongside the SourceResponse, but this sounds hacky, and AFAIK this really does not fit the interpretation of SourceLoadedEvent of clients (or at least that of VS).

  • Could SourceResponse be extended to include a filepath if one can be known lazily?

or another idea

  • Could the protocol specify that if a Source object has both Path and SourceReference, that the client must not attempt to open the physical file prior to sending a SourceRequest? That would give the opportunity to the adapter to fill the file. Of course with some new flag somewhere at the capabilities level or something, to opt into this new mode.
Lenguaje dominante
HTML
Estrellas
1.8k
Forks
173
Merge medio
7 d 7 h
PR fusionados (30 d)
2

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de microsoft/debug-adapter-protocol

Todos los issues de microsoft/debug-adapter-protocol

Issues similares

Más issues de Backend & API Design

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.