Cli php debug not working with phpbrew installed php versions


#1

I am using multiple versions of cli php on cloud9, all installed with phpbrew and working fine.

When I want to debug a php script with a particular version of php I do the following:

$ phpbrew use php-5.6.31 (I tried switch also)
I then right click on the script and select Run
I make sure the Runner is PHP (cli)
I switch on the green bug symbol

then the debugger fires up with the execution stopped at my breakpoint. No problem so far.

However the php version has not changed in this debug session, to what I asked for with phpbrew. I know this because I use $php_ver = PHP_VERSION in the script and I see it hasn’t changed (it stays at 5.5.9-1ubuntu4.22)

How can I debug php scripts using my desired phpbrew versions?

Thank you


#2

The runner uses the php command line command, so whatever version is tied to that is what is run. You can switch this up by either altering your $PATH or by adding a php alias.


#3

Thank you, I’ll give it a try.