Apache + xdebugでphpのデバッグをしたい
windows10でPHPのデバッグをできる環境構築をするため、xdebugを設定しようと思いました。
ただし、xdebugを入れた後からlocalhost経由でアクセスするたびにエラーになってしまい、「接続がリセットされました」と表示され、Apacheが再起動しているようです。
また、イベントビューアーを確認したところ、以下のようなエラーがあったようです。
障害が発生しているアプリケーション名: httpd.exe、バージョン: 2.4.41.0、タイム スタンプ: 0x5d4fec0b 障害が発生しているモジュール名: php_xdebug.dll、バージョン: 2.9.3.2、タイム スタンプ: 0x5e6bbc28
追記)apacheのエラーログは次のようでした
[Sun Mar 22 02:03:58.550064 2020] [mpm_winnt:notice] [pid 2848:tid 672] AH00428: Parent: child process 22792 exited with status 3221225477 -- Restarting. [Sun Mar 22 02:03:59.341158 2020] [mpm_winnt:notice] [pid 2848:tid 672] AH00455: Apache/2.4.41 (Win64) OpenSSL/1.1.1c PHP/7.4.3 configured -- resuming normal operations [Sun Mar 22 02:03:59.342102 2020] [mpm_winnt:notice] [pid 2848:tid 672] AH00456: Apache Lounge VC15 Server built: Aug 11 2019 12:20:04 [Sun Mar 22 02:03:59.342102 2020] [core:notice] [pid 2848:tid 672] AH00094: Command line: 'c:\xampp\apache\bin\httpd.exe -d C:/xampp/apache' [Sun Mar 22 02:03:59.486067 2020] [mpm_winnt:notice] [pid 2848:tid 672] AH00418: Parent: Created child process 23152 [Sun Mar 22 02:04:04.231064 2020] [mpm_winnt:notice] [pid 23152:tid 912] AH00354: Child: Starting 150 worker threads. [Sun Mar 22 02:04:10.230065 2020] [mpm_winnt:notice] [pid 2848:tid 672] AH00428: Parent: child process 23152 exited with status 3221225477 -- Restarting. [Sun Mar 22 02:04:11.018061 2020] [mpm_winnt:notice] [pid 2848:tid 672] AH00455: Apache/2.4.41 (Win64) OpenSSL/1.1.1c PHP/7.4.3 configured -- resuming normal operations [Sun Mar 22 02:04:11.019062 2020] [mpm_winnt:notice] [pid 2848:tid 672] AH00456: Apache Lounge VC15 Server built: Aug 11 2019 12:20:04 [Sun Mar 22 02:04:11.019062 2020] [core:notice] [pid 2848:tid 672] AH00094: Command line: 'c:\xampp\apache\bin\httpd.exe -d C:/xampp/apache' [Sun Mar 22 02:04:11.149060 2020] [mpm_winnt:notice] [pid 2848:tid 672] AH00418: Parent: Created child process 20748 [Sun Mar 22 02:04:15.529059 2020] [mpm_winnt:notice] [pid 20748:tid 812] AH00354: Child: Starting 150 worker threads.
追記)Xdebugのエラーログ
[736] Log opened at 2020-03-22 03:48:53 [736] I: Connecting to configured address/port: localhost:9000. [736] I: Connected to client. :-) [736] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///C:/xampp/htdocs/info.php" language="PHP" xdebug:language_version="7.4.0" protocol_version="1.0" appid="736" idekey="vscode"><engine version="2.9.3"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[https://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2020 by Derick Rethans]]></copyright></init> [736] <- breakpoint_list -i 1 [736] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="1"></response> [736] <- breakpoint_set -i 2 -t line -f file:///c:/xampp/htdocs/info.php -n 2 [736] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="2" id="7360001"></response> [736] <- breakpoint_list -i 3 [736] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="3"><breakpoint type="line" filename="file:///C:/xampp/htdocs/info.php" lineno="2" state="enabled" hit_count="0" hit_value="0" id="7360001"></breakpoint></response> [736] <- breakpoint_list -i 4 [736] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="4"><breakpoint type="line" filename="file:///C:/xampp/htdocs/info.php" lineno="2" state="enabled" hit_count="0" hit_value="0" id="7360001"></breakpoint></response> [736] <- breakpoint_set -i 5 -t exception -x * [736] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="5" id="7360002"></response> [736] <- run -i 6 [21932] Log opened at 2020-03-22 03:48:59 [21932] I: Connecting to configured address/port: localhost:9000. [21932] I: Connected to client. :-) [21932] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///C:/xampp/htdocs/info.php" language="PHP" xdebug:language_version="7.4.0" protocol_version="1.0" appid="21932" idekey="vscode"><engine version="2.9.3"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[https://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2020 by Derick Rethans]]></copyright></init> [21932] <- breakpoint_list -i 1 [21932] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="1"></response> [21932] <- breakpoint_set -i 2 -t line -f file:///c:/xampp/htdocs/info.php -n 2 [21932] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="2" id="219320001"></response> [21932] <- breakpoint_list -i 3 [21932] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="3"><breakpoint type="line" filename="file:///C:/xampp/htdocs/info.php" lineno="2" state="enabled" hit_count="0" hit_value="0" id="219320001"></breakpoint></response> [21932] <- breakpoint_list -i 4 [21932] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="4"><breakpoint type="line" filename="file:///C:/xampp/htdocs/info.php" lineno="2" state="enabled" hit_count="0" hit_value="0" id="219320001"></breakpoint></response> [21932] <- breakpoint_set -i 5 -t exception -x * [21932] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="5" id="219320002"></response> [21932] <- run -i 6
どうにかしてXdebugを利用する方法はないのでしょうか。また、代替手段などはありますでしょうか。
よろしくお願いいたします。
足りない情報などありましたら補足します。
補足情報
PHP Version: 7.4.3
Xdebug installed: 2.9.3
Windows10 Version1903