8

NetBeans で xdebug を使用して PHP をデバッグしてみます。デバッグを開始すると、NetBeans は xdebug との接続を永遠に待ちます。Mac に最新の MAMP パッケージがインストールされた NetBeans 6.8 (最新バージョン) があります。

私の php.ini は次のようになります。

[xdebug]
;zend_extension="/Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so"
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000
4

7 に答える 7

10

最後に、次のように idekey 値を追加する必要がありました。

xdebug.idekey="netbeans-xdebug"

今では動作します:-)

于 2009-12-22T15:52:09.967 に答える
9

php.ini が実際に投稿したものと同じである場合は、zend_extension行のコメントを解除する (つまり、先頭の ' ;' を削除する)必要があるため、Xdebug が実際にロードされます。

次に、Xdebug がロードされていることを確認phpinfo()し、PHP ファイルから呼び出します(念のため)

その後: netbeans でデバッガーを構成するためのオプションがいくつかあると思いますか? もしそうなら、netbeans はポート 9000 でリッスンしていますか? (php.ini で設定したもの)

于 2009-12-22T14:24:50.177 に答える
6

次の設定は、Apache を再起動した後、Mountain Lion 上の NetBeans 7.2 で機能しました。

zend_extension = /usr/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so
xdebug.remote_autostart=on 
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug" 
于 2012-08-23T00:45:40.970 に答える
1

XAMPP 1.8.2 および NetBeans 7.4 で以下を使用して成功しました。

[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
xdebug.idekey="netbeans-xdebug"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = on
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_mode=req
xdebug.remote_host = "localhost"
xdebug.trace_output_dir = "C:\xampp\tmp"
于 2013-12-30T17:04:30.523 に答える
1

Mac/MAMP ユーザー: 上記をすべて試しても問題が解決しない場合は、Mac を再起動してください。MAMP を使用してサーバーを再起動するだけでは不十分です。

于 2012-08-29T14:21:29.270 に答える
0

xdebug は、OS X に同梱されている PHP のバージョンでは動作しないことを読みました。プリコンパイル済みを含む、php-osx.liip.ch の便利なパッケージを使用して、php をバージョン 5.4 から 5.5 に更新することで動作するようになりました。 xdebug 拡張機能。次のコマンドを使用します。

curl -s http://php-osx.liip.ch/install.sh | bash -s 5.5

これにより、デフォルトの php インストールはそのまま残りますが、httpd.conf で無効にすることに注意してください。新しい php.ini は「/usr/local/php5/lib/php.ini」にあり、xdebug 構成ファイルは「/usr/local/php5/php.d/50-extension-xdebug.ini」にあります。

セットアップ: OS X バージョン 10.9.2

ソース: http://coolestguidesontheplanet.com/upgrade-to-php-5-4-or-5-5-mac-osx-10-8-mountain-lion/

于 2014-03-28T00:02:24.593 に答える
0

私にとってはこのように機能しました(ありがとう+1)/o/

<pre>
zend_extension = "c:\xampp\php\ext\php_xdebug2.dll"
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_enable=1
xdebug.remote_handler"dbgp"
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"
</pre>

構成:
netbeans 7.3 - php 5.4 - xdebug 2.2 - xampp - win7(32 ビット)

于 2013-04-08T13:51:23.437 に答える