1

PHPのデバッグにNetbeansを使用しています。私はにアクセスできないphp.iniので、私は使用します.htaccess

php_value   xdebug.remote_host   "localhost"    
php_value   xdebug.idekey               "netbeans-xdebug"
php_flag    xdebug.remote_autostart       Off
php_flag    xdebug.remote_enable          On
php_value   xdebug.remote_port            9000
php_value   xdebug.remote_handler         dbgp
php_flag    xdebug.profiler_enable        on
php_flag    xdebug.remote_connect_back    On
php_flag    xdebug.extended_info          On

sub.mydomain.comポート8080および8090で実行されます。以前、このサーバーでEclipseでxdebugを使用しました。

sub.mydomain.comサーバーにはphpinfo()、上記の設定とともにインストールされたxdebugが一覧表示されます。

Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
with Xdebug v2.1.3, Copyright (c) 2002-2012, by Derick Rethans

Netbeansでは、「プロパティ」と「実行構成」のエントリを構成し、ポートとIDも一致しています(9000、netbeans-xdebug)。

多くの開発者がいsub.mydomain.comますが、誰かがポート9000を使用している場合、これは問題になる可能性がありますか?

それでも、Netbeansで「デバッグ」を実行すると、「接続を待機しています」というメッセージが永遠に表示されます。

私は何をしなければなりませんか?

編集:ローカルホストに修正

4

2 に答える 2

1

次の構成でデバッガーを起動できました。

php_value   xdebug.remote_host   "192.168.1.149"
php_value   error_reporting               22527
php_flag    xdebug.remote_autostart       Off
php_flag    xdebug.remote_enable          On
php_value   xdebug.remote_port            9009
php_value   xdebug.remote_handler         dbgp
php_value   xdebug.remote_log             "..."
php_flag    xdebug.profiler_enable        off
php_flag    xdebug.extended_info          On
php_flag    xdebug.coverage_enable        On
php_value   error_log                     "..."
于 2012-05-25T13:14:12.770 に答える
0

これは間違っています:

php_value   xdebug.remote_host   "sub.mydomain.com"

xdebug.remote_host 設定には、IDEがあるマシンの IP を含める必要があります。これはもちろん、PHP/Xdebug を実行しているマシンがその IP アドレスに接続できる必要があることも意味します。これはhttp://xdebug.org/docs/remote#communicationでも文書化されています

于 2012-05-22T08:07:58.570 に答える