[NFR]: Show the debug page in ADR apps
Maintainer antworten meist innerhalb von 1 Tag
@niden arbeitet bereits daran.
Seit 03.11.2026.
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
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
- Vorherrschende Sprache
- PHP
- Sterne
- 6
- Forks
- 3
- Ø Merge
- 2 Std. 48 Min.
- Gemergte PRs (30 T.)
- 55
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus phalcon/debugbar
-
[BUG]: Member order and function imports do not follow the coding ruleEvtl. vergeben @niden hat das vor 2 Tagen übernommen. Offenbug
phalcon/debugbar#105 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
[BUG]: Debug page: error handler does not return false or chain handlersEvtl. vergeben @niden hat das vor 2 Tagen übernommen. Offenbug
phalcon/debugbar#90 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in phalcon/debugbar
Ähnliche Issues
-
enhancement priority Sales
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
novalo-dev/Prestashop-MCP-Server#201 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
web-token/jwt-framework#757 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Maintainer antworten meist innerhalb von 1 Tag
-
Include flows spanning the full report time windowEvtl. vergeben @somethingwithproof hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
Cacti/plugin_flowview#306 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug origin: upstream priority: low
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
mattytap/Mattytap-Sermons#105 ·