Ground Sunlight

Windowsで作る - PHPプログラミングの開発環境

ユーザ用ツール

サイト用ツール


サイドバー

メインメニュー

XAMPP アレンジ

IED

WSL2

道具箱

リポジトリ編

フレームワーク編

公開ソフトウェア

メタ
リンク


このページへのアクセス
今日: 8 / 昨日: 0
総計: 2331

basic-library:php-debugbar:1.16

文書の過去の版を表示しています。


デバッグ出力 - php-debugbar

Version 1.16 (MIT License)

y2sunlight 2020-03-18

定番ライブラリー に戻る

関連記事

リンク

テストプログラムの所在

{Project Folder}\test\

インストール

D:\>cd usr\workspace3\y2sunlight\apple
D:\usr\workspace3\y2sunlight\apple>composer require maximebf/debugbar
Using version ^1.16 for maximebf/debugbar
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 3 installs, 0 updates, 0 removals
  - Installing symfony/polyfill-mbstring (v1.14.0): Downloading (100%)
  - Installing symfony/var-dumper (v5.0.5): Downloading (100%)
  - Installing maximebf/debugbar (v1.16.1): Downloading (100%)
symfony/var-dumper suggests installing ext-intl (To show region name in time zone dump)
symfony/var-dumper suggests installing symfony/console (To use the ServerDumpCommand and/or the bin/var-dump-server script)
maximebf/debugbar suggests installing kriswallsmith/assetic (The best way to manage assets)
maximebf/debugbar suggests installing predis/predis (Redis storage)
Writing lock file
Generating autoload files
1 package you are using is looking for funding.
Use the composer fund command to find out more!

テスト

/test/php-debugbar.php
<?php
require __DIR__.'/../vendor/autoload.php';
 
use DebugBar\StandardDebugBar;
 
const DEBUG_MODE = true;
 
$debugbar = new StandardDebugBar();
$base_url = '../vendor/maximebf/debugbar/src/DebugBar/Resources';
$debugbarRenderer = $debugbar->getJavascriptRenderer($base_url);
 
$arr = ['0'=>'apple','1'=>'banana','2'=>'chery',];
$debugbar['messages']->debug($arr);
 
$debugbar['messages']->info("info");
$debugbar['messages']->warning('warning');
$debugbar['messages']->error('error');
?>
<html>
    <head>
        <?php if(DEBUG_MODE) echo $debugbarRenderer->renderHead() ?>
    </head>
    <body>
        ...
        <?php if(DEBUG_MODE) echo $debugbarRenderer->render() ?>
    </body>
</html>

コメント

コメントを入力. Wiki文法が有効です:
 
basic-library/php-debugbar/1.16.1584948055.txt.gz · 最終更新: 2020/03/23 16:20 by y2sunlight