PhpStorm と xdebug を使用して php をデバッグするときに、この問題をよく検索しました。この問題について説明しているリンクが 3 つまたは 4 つ見つかりましたが、どれも役に立ちません。私の Xdebug のバージョンは 2.2.3 で、PhpStorm のバージョンは 6.03 です。これを除いて、すべての行を段階的にデバッグできました
$this->link = mysql_connect($this->dbserver, $this->dbuser, $this->dbpass);
PhpStorm は次のエラーを表示します: ide キー "14841" で着信接続を待機しています。これが私のxdebug構成です:
zend_extension="/usr/lib/xdebug.so"
xdebug.remote_autostart=1
xdebug.show_local_vars=1
xdebug.dump.GET=*
xdebug.dump.POST=*
xdebug.dump.SERVER=*
xdebug.auto_trace=On
; default trace output directory /tmp
xdebug.collect_vars = On
xdebug.trace_output_dir=/tmp
xdebug.collect_params=4
xdebug.collect_return=On
xdebug.profiler_enable=Off
; default trace output directory /tmp
;xdebug.profiler_output_dir=/tmp
;xdebug.profiler_enable_trigger=On
;test.php?XDEBUG_PROFILE
xdebug.remote_enable=On
xdebug.remote_host="localhost"
xdebug.remote_port=9001
xdebug.remote_handler="dbgp"
xdebug.remote_log = "/tmp"
xdebug.remote_connect_back=1
xdebug.idekey=PHPStorm
これらの行「 xdebug.remote_connect_back=1 xdebug.idekey=PHPStorm 」を追加し、これも ide に抵抗しました。3 つのパラメーターが正しいことを保証します。