Debugger does not conform to DAP specification
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 30/100
- Tipo de issue
- Refactorización
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- python
- Área
- backend-api-design, devtools
Línea de trabajo
Empieza por ipykernel/debugger.py en _handle_init_sequence y compara el manejo de sus requests con la secuencia de inicialización de DAP en la documentación vinculada de Microsoft. Traza el orden actual de attach, las solicitudes de configuración y configurationDone; el trabajo estará terminado cuando el kernel pueda admitir las requests paralelas necesarias sin completar attach antes de recibir las respuestas de configuración.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Per Microsoft's documentation for the Debug Adapter Protocol, a DAP client should send the launch/attach request in parallel with the various configuration requests, such as setBreakpoints and setExceptionBreakpoints. Only once those configuration requests have received responses should the client send configurationDone, at which time the adapter will return a response to the original launch/attach request. This allows the adapter to fully configure itself before the client considers itself attached.
ipykernel does not currently conform to this specification. It includes a _handle_init_sequence method which manually sends the configurationDone request to the adapter rather than use the original one from the client. It does this in response to the original attach request, too, well before the client would have sent that message itself.
This is problematic because:
- This method assumes DAP to work synchronously, whereas by definition the initialization sequence is meant to be conducted in parallel
- The
configurationDonerequest may make it to the adapter before the actual configuration requests (setBreakpoints...). This may cause issues (which we have actually seen) where the DAP client receives a response toattachbefore the adapter is done configuring. This leads to breakpoints not being set in time and ultimately being missed.
The root of this problem is the synchronous handling of DAP requests by ipykernel; the kernel cannot send Request B until Request A receives a response, so this parallel nature of initialization is currently not possible to conform to.
The solution to this problem would be to change how ipykernel handles DAP requests. One solution would be to use a queue to which requests are pushed, similar to how responses are handled. We can implement a working solution and submit a PR, if the maintainers are okay with it.
- Lenguaje dominante
- Python
- Estrellas
- 734
- Forks
- 411
- Merge medio
- 1 d 2 h
- PR fusionados (30 d)
- 9
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 ipython/ipykernel
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 68/100
-
ipython/ipykernel#1550 · 1 comentario · 1 reacción · 1 asignado ·
Todos los issues de ipython/ipykernel
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
learningequality/ricecooker#747 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
BSData/horus-heresy-3rd-edition#3171 ·
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
run-llama/llama_index#23199 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
KhronosGroup/glTF-Blender-IO#2769 ·