いっつも忘れるので、サイトを徘徊して見つけるんじゃなくて、ひとまとめにしとこう。
環境
ダウンロード
設定
[XDEBUG] zend_extension="D:\php-5.6.5-nts-Win32-VC11-x86\ext\php_xdebug-2.2.7-5.6-vc11-nts.dll" xdebug.remote_enable=on xdebug.remote_handler=dbgp xdebug.remote_host=localhost xdebug.remote_port=9000 xdebug.show_local_vars=1 xdebug.dump_globals=1 xdebug.dump.SERVER=QUERY_STRING, REQUEST_URI xdebug.dump.GET=* xdebug.dump.POST=* ;xdebug.profiler_enable=1 ;xdebug.profiler_output_dir="D:\php-5.6.5-nts-Win32-VC11-x86\tmp" ;xdebug.auto_trace=1 ;xdebug.trace_output_dir="D:\php-5.6.5-nts-Win32-VC11-x86\tmp"
PHPのバージョン、スレッドモードを合わせたxdebugをダウンロードするのが前提で、設定内容は以下の通り。
zend_extension=xdebugのdllが存在するパス xdebug.remote_enable=onでリモートデバッグ xdebug.remote_handler=dbgpで固定 xdebug.remote_host=リモートホスト(ローカル開発は大抵localhost) xdebug.remote_port=9000がデフォルトポート xdebug.show_local_vars=1で変数の表示を行う xdebug.dump_globals=1でグローバル変数の表示を行う xdebug.dump.SERVER=QUERY_STRING, REQUEST_URI $_SEVER["QUERY_STRING"]、$_SERVER["REQUEST_URI"]のみ表示する xdebug.dump.GET=*で$_GETの中身を全部表示する xdebug.dump.POST=*で$_POSTの中身を全部表示する ;xdebug.profiler_enable=1でプロファイルを行う ;xdebug.profiler_output_dir=プロファイルの保存先ディレクトリ ;xdebug.auto_trace=1でトレースを行う ;xdebug.trace_output_dir=トレースの保存先ディレクトリ