I have a code in PHP that edits a text file. The Xdebug stops at a breakpoint (first line of the code). The first line is nothing to do with writing to a file or anything. Then, I press the stop button of NetBeans so that everything terminates. Then I see the file on Notepad++ and I see the file re-written and asked whether to re-read in the file because it has been re-written by other programme (suppose the PHP program).
I have re-installed NetBeans and XAMPP and Xdebug. Edited php.ini. Doesn't work. The same. I managed to get the log of Xdebug which I don't understand. I did the same with VSCode and I get the result I expect, the text file is not re-written and the PHP programme is terminated.
How do I write in the php.ini file and xdebug.log file? It doesn't let me post!
Here is my php.ini ..
[XDebug]
xdebug.log="C:\XXXX\php\tmp\xdebug.log"
zend_extension="C:\XXXX\php\ext\php_xdebug.dll"
xdebug.mode=debug
xdebug.start_with_request = yes
xdebug.client_host=localhost
xdebug.client_port=9003
xdebug.idekey="netbeans-xdebug"
Here is my xdebug.log ( C:\XXXX\php\tmp\xdebug.log )
[54404] Log opened at 2024-10-15 08:22:12.538412
[54404] [Step Debug] INFO: Connecting to configured address/port: localhost:9003.
[54404] [Step Debug] INFO: Connected to debugging client: localhost:9003 (through xdebug.client_host/xdebug.client_port).
[54404] [Step Debug] -> \<init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///C:/XXXX/htdocs/index.php" language="PHP" xdebug:language_version="8.2.12" protocol_version="1.0" appid="54404" idekey="netbeans-xdebug">\<engine version="3.3.2">\<![CDATA[Xdebug]]>\</engine>\<author>\<![CDATA[Derick Rethans]]>\</author>\<url>\<![CDATA[https://xdebug.org]]>\</url>\<copyright>\<![CDATA[Copyright (c) 2002-2024 by Derick Rethans]]>\</copyright>\</init>
[54404] [Step Debug] -> \<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" status="stopping" reason="ok">\</response>
[54404] [Step Debug] WARN: There was a problem sending 179 bytes on socket 2140: 既存の接続はリモート ホストに強制的に切断されました。 (error: 10054).
[54404] Log closed at 2024-10-15 08:22:40.494032