0

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
4
  • The warning shows that the IDE has likely shut down the debugging connection. I wouldn't recomment to still use Netbeans, but VS Code with the Xdebug plugin, or PhpStorm. Commented Oct 24, 2024 at 0:00
  • I've newly installed XAMPP for Windows 8.2.12, Xdebug 3.3.2, NetBeans IDE 23, and at the end of debugging I see hundreds of "DEBUG SESSION ENDED" message repeated. This is another problem. Does anyone know how to fix this? Commented Oct 30, 2024 at 18:28
  • That was a bug (bugs.xdebug.org/view.php?id=2250) which will be fixed with the next release. Commented Nov 6, 2024 at 16:25
  • I've been using Netbeans for a long time. This is first time: something like this to happen. Please let me know if anyone knows how to fix it. Commented Nov 7, 2024 at 19:21

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.