[NFR]: Show the debug page in ADR apps
Los mantenedores suelen responder en 1 día
@niden ya está trabajando en esto.
Desde el 3/11/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Summary
The package gives two things: the debug bar and the debug page (Phalcon\Debug). The debug page does not show in an ADR app, because ADR catches all exceptions before the debug page handler can run. Show the debug page in ADR apps, in development only.
Current state
Debug::listen()usesset_exception_handler()(src/Debug.php:178).Phalcon\ADR\Application::handle()catches eachThrowableand sends it toErrorResponder.AbstractHttpFront::run()also catches eachThrowable. The handler does not run for these exceptions.Debug::halt()throwsRequestHalted(src/Debug.php:147), andonUncaughtLowSeverity()throwsRuntimeWarning(src/Debug.php:253). In an Action, these also go toErrorResponder, so the client gets a generic error response.ErrorResponderhas a debug mode that gives the exception to the client. It does not give the debug page (backtrace, code fragments and superglobals).
Proposed direction
- Use the logger adapter from #47 to get the exception.
- Add a listener on
application:afterHandle. When the logger received an exception, the response status is 500 or higher and the response is not JSON, the listener replaces the response content withDebug::renderHtml($exception). - Keep the status that
ErrorResponderset. A 404 fromRouteNotFoundkeeps the application error page. - The application opts in through a config key of the ADR service provider from #14.
- The listener runs only when the bar boots, and only for a client that
AccessGateallows. The debug page shows sensitive data.
Notes
This design is not tested yet. Test it first in this issue.
Acceptance
- In an ADR app in development, an exception in an Action shows the debug page.
Debug::halt()in an Action shows the debug page.- The debug page is absent in a blocked environment and for a denied client.
- The debug page does not replace a JSON response or a 404 response.
- The bar is not injected into the debug page.
- The public API of
Phalcon\Debugdoes not change. - Tests pass with full coverage.
phpcsandphpstanpass.
Depends on
- #14
- #47
Part of
#13
- Lenguaje dominante
- PHP
- Estrellas
- 6
- Forks
- 3
- Merge medio
- 3 h 31 min
- PR fusionados (30 d)
- 43
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la 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 phalcon/debugbar
-
[BUG]: Duplicated JS and CSS for the exceptions and logs panelsPosiblemente ocupada @niden la tomó hace 1 día. Abiertobug
phalcon/debugbar#108 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[BUG]: The last exception differs between MVC and ADRPosiblemente ocupada @niden la tomó hace 1 día. Abiertobug
phalcon/debugbar#107 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[BUG]: Small fixes for IP match, accessibility and docblocksPosiblemente ocupada @niden la tomó hace 1 día. Abiertobug
phalcon/debugbar#106 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[BUG]: Member order and function imports do not follow the coding rulePosiblemente ocupada @niden la tomó hace 1 día. Abiertobug
phalcon/debugbar#105 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[BUG]: CI does not test a Phalcon 5 only install or the minimum versionPosiblemente ocupada @niden la tomó hace 1 día. Abiertobug
phalcon/debugbar#104 · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de phalcon/debugbar
Issues similares
-
IDS: enable Suricata 8 Hyperscan MPM cache (detect.sgh-mpm-caching) in suricata.yaml templateAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
opnsense/core#11171 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
getgrav/grav-plugin-form#664 ·
-
claude
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
sprain/sprainocchio#26 ·
-
sync-en
Dificultad 1/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
sync-en
Dificultad 1/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día