Python debugger for php project

Hi,

Can we have a use case of using the python debugger for a php project ?

The doc is unclear, and I cannot think of any way of using the python debugger.

I once questioned here about the debugger, but finally I ended up using synchronized folders between my VM and local folders. So I still have no ideas on how to use the python debugger and how it can be useful.

Thanks!

Patrick

Would you please link to the document in question? That sounds like a typo.

The link :
http://docs.komodoide.com/Manual/debugphp#debugging-php-komodo-ide-only_remote-php-debugging_invoking-the-php-remote-debugger_to-initiate-remote-debugging-using-the-dbgp-proxy

I’d like a simple example so that I can test remote debugger both with the python debugger and with the other way.

Without synchronising the folders, how komodo knows how the local file relates to the remote file ?

Hi, I don’t see any mention of the Python debugger on that PHP debugging page. I do not understand what you are trying to do. Using the Python debugger for PHP is not possible.

I found a way to use the python debugger :
Inside this folder : C:\Program Files (x86)\ActiveState Komodo IDE 11\lib\support\dbgp\bin

There is a “pydbgpproxy.exe”, and 3 python scripts : py3_dbgp.py , pydbgp.py and pydbgpproxy.py .

I have python 3.6.4 and the scripts are not working for me. But it works with “pydbgpproxy.exe”.

With “pydbgpproxy.exe” running with default settings, I open komodo and check “a system-provided free port” and “I am running a debugger proxy”, and set address to “127.0.0.1:9001”.

Now in cmd, I enter this :

set XDEBUG_CONFIG=remote_port=9000 remote_enable=1 idekey=komodo
php -f testing.php

And it works in cmd.

In the browser : testing.php?XDEBUG_SESSION_START=komodo

Why komodo needs to use “system-provided free port” if I use “XDEBUG_CONFIG=remote_port=9000” ?

Ok, pydgpproxy can use any 2 ports, and the komodo “specific port” is not related to those 2 ports.

C:\Program Files (x86)\ActiveState Komodo IDE 11\lib\support\dbgp\bin>pydbgpproxy.exe -d 23424 -i 19283
INFO: dbgp.proxy: starting proxy listeners. appid: 11216
INFO: dbgp.proxy: dbgp listener on 127.0.0.1:23424
INFO: dbgp.proxy: IDE listener on 127.0.0.1:19283

cmd:
set XDEBUG_CONFIG=remote_port=234234 remote_enable=1 idekey=komodo
php -f testing.php

And for the browser :

http://localhost/phpacademy/testing.php?XDEBUG_SESSION_START=komodo

But I have to set the new port in php.ini : xdebug.remote_port = 2342, and restart apache.

All is fine now !