CakePHP2 + XAMPP + Netbeansでデバッグ

割りとハマったのでメモ。

新しいXAMPPにはxdebugというdllが入っているのでそれを利用。
php.iniの以下の行のコメントアウトを外す。

zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
xdebug.remote_enable = 0
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost"
xdebug.remote_port = 9000

xdebug.remote_enableの値を1に変える

xdebug.remote_enable = 1

apacheを再起動。
この状態でhttp://localhostにアクセスし、phpinfo()でxdebugが有効になっているか確認。

netbeansのプロジェクト->プロパティ->実行構成を開いて、
開始ファイルに"app/webroot/index.php"を設定。

次がハマったポイント。
ここまでで起動はできたが、どうしても訳の分からない行でブレークする。
理由がここに書いてあった。
http://stackoverflow.com/questions/350966/how-can-i-make-netbeans-not-stop-on-the-first-line-with-xdebug

ツール->オプション->PHP->デバッグ->最初の行で停止 のチェックを外す。

これで問題なく動きまーした。