Download the PHP package ryunosuke/php-web-debugger without Composer

On this page you can find all versions of the php package ryunosuke/php-web-debugger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-web-debugger

WebDebugger

Description

フレームワークに依存せず、リクエスト中の各種情報を収集します。 要するに php-debugbar みたいなやつです。

主な機能は下記です。

ScreenShot

Install

Usage

下記を「リクエスト時に必ず通る箇所」に記述するだけです。 共通 include や フレームワークの Bootstrap などがいいでしょう。

このライブラリは Web に特化しているので 共通 include の場合は Web 以外の時に読み込まれるときに注意しましょう(とは言えあまり実害はないはずです)。 レスポンスをフックする処理があるので、リクエストの最後の方ではなく最初の方に記述するのが無難です。

オプションは省略してもそれなりに動きますが、細かな設定を行いたい場合は引数で指定してください。 詳細はソースを参考にしてください。

Database の Master/Slave など、同じモジュールを複数の設定で使いたい場合は下記のようにします。

要するに初期化済みインスタンスの配列を渡すだけです。

まとめると初期化の方法は下記の2通りです。

なお、上記は混在化です。

module

上記のような各種情報を集めるクラスを「モジュール」と呼びます。 モジュールは AbstractModule さえ継承していれば任意に実装・追加が可能です。

rewrite

rewrite について補足すると、前提として body にデバッグ用 html/js/css を差し込んで表示しているため、content-type が text/html でないとアイコン群が表示されません。 例えば JSON な WebAPI や Ajax 処理を作ったとして、その URL を直に叩いてもデバッガは表示されません。

このオプションを指定するとマッチした Content-Type のときに強制的に text/html とみなし、コンテンツも html に書き換えます。 視認性のため、元のコンテンツは整形表示され、pre として埋め込まれます。

それなりにアグレッシブな挙動であり、本来と異なる結果になりうることもあるため、なにかおかしな点があったら無効にして様子を見てみてください。

opener

opener について補足すると、エラーログのトレースやログの呼び出し箇所など、各モジュールでは随所に「ファイルパス:行番号」という情報が埋め込まれます。 opener を設定しておくと、画面クリック時にその URL に file, line パラメータ付きでリクエストを飛ばせます。 opener_query も設定しておくとクエリパラメータも一緒に飛びます。

飛び先で file, line に基づいて phpstorm などで指定ファイル・行番号を開くように設定しておけばそのファイルをその行番号で開くようにできます。 要するに IDE ジャンプを http で模したものです。

bin ディレクトリにリファレンス実装があります。

License

MIT


All versions of php-web-debugger with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ryunosuke/php-web-debugger contains the following files

Loading the files please wait ....