hypnoticum
hypnoticum

Reputation: 75

CodeLite waiting for XDebug

I tried to set up a php debug-session using CodeLite and XDebug following the instructions at: https://docs.codelite.org/debuggers/xdebug/ But when I try to connect, the output stucks and CodeLite debugging is not startet.

In the console window, I change to the directory where my "test.php" resides. When I start the php-web-server by typing the command:

php -S 127.0.0.1:9000 -t .

I got the response:

Cannot load Xdebug - it was already loaded
PHP 7.3.31-1~deb10u7 Development Server started at Tue Feb 11 14:54:42 2025
Listening on http://127.0.0.1:9000
Document root is /home/daniel/Dokumente/Code/homepage/test
Press Ctrl-C to quit.

When I press the "Wait for debugger to connect"-button in CodeLite, I get a message:

"This project has no file mapping defined. 
This may result in breakpoints not applied. 
To fix this, set file mapping from Project-Settings -> Debug."

CodeLite file-mapping warning

Without CodeLite opened, the browser is able to open the script "test.php"

When I try to enter the debug session, having the CodeLite warning closed by "OK, Continue to Debug"-button, it seems to stuck in line one, because the browser is pending and the console response is:

[Tue Feb 11 15:11:16 2025] PHP Warning:  Header may not contain NUL bytes in /home/daniel/Dokumente/Code/homepage/test/test.php on line 1

Ctrl + C does no more end the php-server

The configuration of my php.ini is:

[XDebug]
xdebug.remote_enable=1
zend_extension = /usr/lib/php/20180731/xdebug.so
xdebug.idekey="codeliteide"
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_log = xdebug.log

The xdebug.log:

[2940] Log opened at 2025-02-11 14:11:16
[2940] I: Connecting to configured address/port: 127.0.0.1:9000.
[2940] I: Connected to client. :-)
[2940] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///home/daniel/Dokumente/Code/homepage/test/test.php" language="PHP" xdebug:language_version="7.3.2-3" protocol_version="1.0" appid="2940" idekey="codeliteide"><engine version="2.7.0RC2"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[https://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2019 by Derick Rethans]]></copyright></init>
[2940]

Upvotes: 1

Views: 39

Answers (0)

Related Questions