Komodo PHP Debugger broken: OS-X Yosemite

OS (above) is a little out of date. I’m running 10.10 Yosemite

I’ve been running 8.5.4 for over a year without too much difficulty. Updated MAMP and PHP debugging is now broken.

Trying to find the alleged “Setup Wizard”. No luck with help locating that.

Tried to set up by hand and still getting error messages and of course the debugger is very dead.

Questions:

  1. What version of PHP is Komodo 8.5.4 compatible with?
  2. On the Default PHP Interpreter screen - where should options boxes point:
  • “Use this interpreter”?
  • " Directory containing php.ini" (that one is pretty obvious, but still getting an error message in the next box).

Attached a screen shot with config screen and error log

Hey sorry @tmw100, I thought i replied to this in the morning.

Komodo should be working just fine with PHP 5.5. I’m running 5.5.15. I see you’re on 5.5.18 but that shouldn’t matter.

Could you try removing the php.ini config you’ve added and see if that helps? I’d also try the non cgi executable just to see if that helps.

I unfortunately don’t have a Yosemite machine to test this on. I’ll ask @nathanr if he has any luck on his machine.

  • CaREY

Did you install xDebug and configure it for your PHP version? I’m write a simple tutorial how to do that in Debian Linux but configuring xDebug same everywhere: in Mac, Linux and Windows.

Shortly what you must do:

For me it’s just a zend_extension = "xdebug.so" (I use XAMPP)

short version at the bottom

@defman, that is only necessary for remote debugging, or in your case, compiled your own xdebug. I would like to get @tmw100 back to the default config where it should work, then we can muck around with workarounds.

For supported versions of PHP, Komodo has the xdebug bits stored in KOMODO_DIR\libs\support\php\debugging. That path varies slightly between OSs but you get the idea.

Komodo will detect your PHP version that is on your system PATH then create a PHP.ini file that it will store in your Komodo profile. Here’s mine on Windows:"%LOCALAPPDATA%\ActiveState\KomodoIDE\8.5\php\5.5.1\php.ini". It has the Komodo debugging config lines pre-pended to the file.

Any way, long story short. You should be able to simply point Komodo at your PHP interpreter and it will do the rest. So try the most basic setup first then we can move forward if that doesn’t work.

  • Carey

It’s necessary if MAMP or XAMPP automatically configure mysql and mysqli for using (in most cases it’s true). And when you try to configure Komodo’s php.ini - you can get some problems with paths to mysql.sock or something like it.

That’s out of scope here @Defman . If you need a custom php.ini file then sure, make one. But we’re just trying to figure out why @tmw100’s PHP isn’t working.

  • Carey
1 Like

What is the “original default”? I did not modify the php.ini that came from the download from MAMP.

How and where does one point Komodo to the PHP Interpreter? Actually, I know where that config is done; but the question is what file/location is the dialog box looking for on Mac OS?
(see attached screenshot)

Remove path from “Directory containing php.ini” and Komodo will start use default php.ini in folder KOMODO_LIB_SUPPORT_FOLDER/php/debugging/<major interpreter version> based on selected interpreter, e.g. for php 5.5.18 Komodo will start use KOMODO_LIB_SUPPORT_FOLDER/php/debugging/5.5/xdebug.so xDebug version.
[Or you can follow the train, CJ my instructions how to install xDebug and configure it][1]

Or try to insert in bottom/top of your MAMP php.ini this line:

zend_extension = "/Applications/Komodo [IDE|Edit] [Version].app/Contents/SharedSupport/php/debugging/5.5/xdebug.so"
[1]: Install Apache2, PHP5.6 and Xdebug and configure it for Komodo Debugging (Linux - Debian/Ubuntu)

Making progress and much closer. The error message has gone away in the config screen. Debug is silently not doing anything. I’m thinking xdebug needs to be installed… Not sure where that goes - yet. Or, where to get the correct version

I believe I have “local” debugging working…

Now that PHP is configured correctly, I’m wondering if that really even mattered. It turns out I AM needing to configure for remote debugging
According to the docs at http://docs.activestate.com/komodo/5.2/debugphp.html#remote_debug_PHP

Remote PHP debugging encompasses all types of PHP debugging not initiated from within Komodo, including debugging PHP scripts running under a local web server.

I’m attempting to debug code written for Drupal… In the past, I’ve always initiated debug from the browser window by appending the following

/?XDEBUG_SESSION_START=1

Now the question is where and how to configure for remote… the documentation for configuring for Mac OS is not very clear, at best, and I believe inaccurate. (see attached screen shot )

  1. You read old documentation for Komodo 5.2. Actual documentation for 8.5: http://docs.activestate.com/komodo/8.5/debugphp.html#remote_debug_PHP
  2. <komodo-install-directory> is a /Applications/Komodo [IDE|Edit] [version].app/

You’re right, link I specified was wrong. But the documentation is the same in this instance.

Finally got it working. The most relevant pieces to the puzzle are:
I’m debugging remotely. Remotely means more then just debugging from a server that is physically remote.
The documentation for setting up debugging isn’t the easiest thing to follow. WHERE the xdebug.so file is kept does not make much difference, as along as it is pointed to correctly in the php.ini file. The php.ini file must be the same one being loaded by the web server that is rendering the content that is being debugged.

I’ve attached screen shots of the relevant section of that ini file, and a screenshot of the Komodo configuration file

Finally, the documentation for setting up debugging for V.8.5 is located here:
http://docs.activestate.com/komodo/8.5/debugphp.html