phpバージョン5.6からデバッガのphpdbgが同梱されています。phpdbgを別途インストール・設定する必要はありません。xamppの場合は以下のディレクトリに実行ファイルがあります。
C:\xampp\php\phpdbg.exe
まず「C:\xampp\php\」にtest.phpを格納します。次に「C:\xampp\php\」でコマンドプロンプトを実行し、以下のコマンドでphpdbgを実行します。
phpdbg -e test.php
実際は-eオプションがなくても動きます。
phpdbg test.php
実行後は以下のように表示されます。
[Welcome to phpdbg, the interactive PHP debugger, v0.5.0]
To get help using phpdbg type "help" and press enter
[Please report bugs to http://bugs.php.net/report.php]
[Successful compilation of C:\xampp\php\test.php]
helpコマンドで実行できるコマンドの一覧を見ることができます。help runのようにhelpの後にコマンドを指定すると、そのコマンドの説明が表示されます。runはコードを実行するコマンドです。
