Debugger exceptions crash the debugger and disconnect from the client
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Start with the protocol-server request handling in lib/debug/server_dap.rb, especially the variable-rendering code at lines 877-921, and review commit f9f3a7fee7d37749e69de5b16689636621c4fdbd. Compare the DAP and CDP server paths and determine where an injected exception can be handled centrally. Done means protocol-server exceptions produce an error response with details while the debugger remains connected.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Your environment
ruby -v:ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin22]rdbg -v:rdbg 1.8.0 {:mode=>:start, :no_color=>nil}
Describe the bug
Developing the CDP/DAP servers can be quite tedious, because any mistakes can raise exceptions that aren't caught, crash the server, and disconnect your IDE. Each time it requires restarting your debugger session.
To Reproduce
Add a raise anywhere in the protocol servers, e.g. where variables are rendered.
Expected behavior
A error response to be sent to the client, which can display a message with error details.
Instead, the exception is raised, the debug adapter crashes, and the client disconnects.
Additional context
I played around with implementing this here, and got it working for the :scope and :variables requests.
It's pretty fiddly, it looks like each when branch needs to be wrapped in a separate begin/rescue block, which is quite tedious. I wonder if there's a more central place to rescue it.
It would also need to be implemented twice, because of all this logic is duplicated between the DAP and CDP servers.
- Lenguaje dominante
- Ruby
- Estrellas
- 1.3k
- Forks
- 146
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
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 ruby/debug
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
-
Support exceptionOptions in setExceptionBreakpoints to catch arbitrary exception classes via DAP Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Todos los issues de ruby/debug
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
バグ
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
-
Version bump for OpenVox 9 Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
voxpupuli/puppet-epel#186 · 1 comentario ·
-
external_created_at is no longer used for the message timestamp since the new message UI (v4.4.0) AbiertoBug Frontend
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100