eZ Publish 4.x または Legacy でデバッグ情報を出力したい場合は以下のように INI ファイルを設定する。
INI 設定
基本設定
site.ini.append.php
[DebugSettings]
DebugOutput=enabled
DevelopmentMode=enabled
[TemplateSettings]
Debug=enabled
使用テンプレート出力
site.ini.append.php
[TemplateSettings]
ShowUsedTemplates=enabled
ページのレンダリングに使用されている全てのテンプレートファイル名を出力してテーブル表示する。
ShowXHTMLCode
site.ini.append.php
[TemplateSettings]
ShowXHTMLCode=enabled
SQL デバッグ出力
site.ini.append.php
[DatabaseSettings]
SQLOutput=enabled
特定の IP アドレスでデバッグ出力
site.ini.append.php
[DebugSettings]
DebugByIP=enabled
DebugIPList[]
DebugIPList[]=192.0.0.42
DebugIPList[]=192.0.0.0/27
特定のユーザーでデバッグ出力
site.ini.append.php
[DebugSettings]
DebugByUser=enabled
DebugUserIDList[]
DebugUserIDList[]=14
DebugUserIDList[]=70
デバッグリダイレクト
site.ini.append.php
[DebugSettings]
DebugRedirection=enabled
Regional Debug
[RegionalSettings]
Debug=enabled
If debug is enabled eZ publish will display information about the locale files that are loaded. You need to turn on Debug globally to see debug output.
Regional DevelopmentMode
[RegionalSettings]
DevelopmentMode=enabled
Development mode makes eZ publish translate all untranslated string using bork mode. This can be handy when spotting untranslated text.
ShowMethodDebug
site.ini.append.php
[TemplateSettings]
ShowMethodDebug=enabled
Sets if debug information about called functions and operators should be displayed.
デバッグ用テンプレートファンクション
- {debug-accumulator}
- {debug-log}
- {debug-timing-point}
- {debug-trace}
デバッグ用エクステンション
eZDebug extension
追加されるテンプレートオペレーター
- eZDebug()
- objDebug()
- addTimingPoint()
- numQueries()
- getDefinedvars()
使用例
{concat('Current node: ',$node.node_id)|eZDebug()}
{'ASSERT FAILED: WE SHOULD NEVER BE HERE!'|eZDebug('error')}
{$unknown_object_here|objDebug()}
{concat('Queries executed so far: ',numQueries())|eZDebug()
スクリーンショット
http://projects.ez.no/ezdebug_template_operator
https://github.com/gggeek/ezdebug