microsoft / microsoft/vscode-debugadapter-node
ProtocolClient.send breaks async stacktraces
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- TypeScript
- Estrellas
- 306
- Forks
- 90
- Merge medio
- 8 h 36 min
- PR fusionados (30 d)
- 3
Descripción
The following implementation:
https://github.com/microsoft/vscode-debugadapter-node/blob/1621133e71527d9d46438edb766eaf8e731b68f5/testSupport/src/protocolClient.ts#L69-L80
is not async itself and returns the promise immediately without awaiting it. Consequently, if the promise gets rejected with an error, the stack trace in the error does not include either send or its caller. This unnecessarily complicates debugging of e.g. async unit tests that await send() and receive an unexpected error response.
Instead, the callback for doSend should capture the raw response in a wrapper promise, and then send should await that promise and translate it to a throw.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
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.
Línea de trabajo
Comienza en testSupport/src/protocolClient.ts, en la implementación enlazada de ProtocolClient.send, e inspecciona cómo llama a doSend. Sigue la ruta de la promesa rechazada y verifica que send espera un wrapper alrededor de la respuesta sin procesar antes de traducir el error. Está hecho cuando los stack traces de rechazo asíncrono incluyen send y su llamador.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- typescript
- Área
- api
- Tipo de issue
- Error
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 45/100