Zend Studio 9 error using built-in debugger - mac os 10.8
-
25-06-2021 - |
Question
I've just upgraded to a new Mac running Mountain Lion (OS 10.8) and I'm having problems getting my fresh install of Zend Studio 9 to debug properly using CLI.
Note that I am trying to run and debug using studio's built-in debugger and am not connecting to a remote server. When I try to run a script as a CLI Application, I get the following error:
Error launching '[NAME OF FILE]'
The session could not be started.
In order to generate debug information, please make sure the debugger is
properly configured as a php.ini directive.
On my old machine, running Snow Leopard with the same version of Zend Studio, turning on CLI support and running the file worked fine. Again, I am not using an outside version of PHP so should not have to configure php.ini.
I have tried all manner of restarting and reinstalling and still get this error. Can anyone point me in the right direction?
Solution 2
Finally figured this out. It was an incompatibility with OSX Mountain Lion. When I was able to get the Zend Studio console to show the actual internal error message, I found that the same problem existed for Zend Server (which I think Zend fixed there).
The same problem in Zend Server is described here: http://www.andrew-kirkpatrick.com/2012/07/apache-not-starting-in-zend-server-with-mac-os-x-10-8-mountain-lion-upgrade/ The command you have to run for Zend Studio instead of Zend Server is a little different because the internal version of PHP is buried deep within the Zend Studio file structure. Instead of the one in the link, it's this:
sudo cp /usr/lib/libxslt.1.dylib /Applications/Zend\ Studio.app/Contents/Resources/Java/plugins/com.zend.php.debug.debugger.macosx_5.3.18.v20120625/resources/lib/.
Hope this helps someone.
OTHER TIPS
Here is what I did to resolve the problem:
- Open Zend Studio
- Run -> Debug Configurations
- Select your PHP CLI Application (or create a new one)
- In the PHP Script tab select Alternate PHP
- Click on Installed PHPs...
- Click on Add
- Fill in form
- Name: Local Zend PHP-CLI
- Executable Path: /usr/local/zend/bin/php-cli
- PHP ini file: /usr/local/zend/etc/php.ini
- SAPI Type: CLI
- PHP Debugger: Zend Debugger
- Click on OK
- Click on OK
- In the PHP Script tab select: Local Zend PHP-CLI
- Click on Apply
In my Studio, the Alternate PHP now reads: Local Zend PHP-CLI (Zend 5.3.14 CLI)
The Debug button will now start a real debugging session!
For all new CLI debugging configurations, just select the Alternate PHP: Local Zend PHP-CLI