[NFR]: Show the debug page in ADR apps
メンテナーはふだん 1 日以内に返信
@niden がすでに取り組んでいます。
2026年11月3日 から。
評価
この issue はまだ評価されていません。
説明
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
- 主要言語
- PHP
- スター
- 6
- フォーク
- 3
- 平均マージ
- 3時間 31分
- マージ済み PR(30日)
- 43
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
phalcon/debugbar のほかの issue
-
[BUG]: Duplicated JS and CSS for the exceptions and logs panels対応中かも @niden が 1 日前に担当しました。 オープンbug
phalcon/debugbar#108 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
[BUG]: The last exception differs between MVC and ADR対応中かも @niden が 1 日前に担当しました。 オープンbug
phalcon/debugbar#107 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
[BUG]: Small fixes for IP match, accessibility and docblocks対応中かも @niden が 1 日前に担当しました。 オープンbug
phalcon/debugbar#106 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
[BUG]: Member order and function imports do not follow the coding rule対応中かも @niden が 1 日前に担当しました。 オープンbug
phalcon/debugbar#105 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
[BUG]: CI does not test a Phalcon 5 only install or the minimum version対応中かも @niden が 1 日前に担当しました。 オープンbug
phalcon/debugbar#104 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
phalcon/debugbar の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
opnsense/core#11171 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
getgrav/grav-plugin-form#664 ·
-
claude
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
sprain/sprainocchio#26 ·
-
sync-en
難易度 1/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
sync-en
難易度 1/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信