Page 1 of 1

debugging php with XDEBUG

Posted: Mon Apr 20, 2020 3:40 pm
by Stephan123
Hello,

i will debugging a simple script.

I works under Windows 10.
I start the the build in php server with:

-----------
php -S 127.0.0.1:80 -t c:/xampp1/htdocs/test/public/
-----------------------

In the php.ini file i have the block:

---------------------------
[Xdebug]
zend_extension = C:\xampp1\php-7.3.6\ext\php_xdebug.dll

; remote Debugging
xdebug.remote_enable = true
; xdebug.remote_autostart = true
xdebug.remote_host = "127.0.0.1"
xdebug.remote_port = 9000
xdebug.remote_handler = "dbgp"
xdebug.idekey="PHPSTORM"

-----------------------

When i run the command;

-----------------
phpinfo();
--------------------

I see in the browser xdebug work correct.

My test script is:

-------------------
<?php

$test123;

for($i = 0; $i < 10; $i++){
echo $i."<br>";
}

----------------------------

when i call 127.0.0.1/public/index.php
the script works correct.

Now my question. How can i start xdebug in CodeLite ?


Your sincerly

Stephan

Re: debugging php with XDEBUG

Posted: Tue Apr 21, 2020 12:09 am
by eranif
I just tested with PHP 74. And it works (Windows 10/64)
I created a tutorial and updated the wiki:

https://wiki.codelite.org/pmwiki.php/Ma ... WithXDebug


HTH,
Eran

Re: debugging php with XDEBUG

Posted: Sun Jul 19, 2020 8:14 pm
by kur-ka
Extending almost the same question:
What do I need to install on a Win10 machine to be able to use Codelite for Javascript and PHP programming?
- any stand alone browser (not to mention the cranky stock Edge)
- any stand alone server with PHP enabled (toghether with Xdebug)?

Re: debugging php with XDEBUG

Posted: Mon Jul 20, 2020 9:30 am
by eranif
in order to debug PHP code, you will need:
WebServer (Apache 2.4 or something similar)
Xdebug extension *loaded*
Any browser will do (I personally am using firefox, but chrome will do as well)