3
votes

Over the past few days I have been trying to get debugging working with PHPStorm 10 on my local machine (Mac OS). I have tried both ZendDebugger and xdebug.

I seem to be hitting the same problem with both. I setup my interpreter and it says that the correct Debugger is installed on XAMPP but then when I run the "Validate Debugger Configuration on Web Server" tool in PHPStorm it gives the error: No debug extension is loaded.

The following is my php.ini file settings for Xdebug:

[Xdebug]
zend_extension=/Applications/XAMPP/etc/xdebug.so
xdebug.remote_enable=1
xdebug.remote_port=9000
xdebug.profiler_enable=1
xdebug.profiler_output_dir=/Applications/XAMPP/xamppfiles/htdocs/sam-files/
xdebug.idekey=PHPStorm

I have also been using the following recourses online:

https://www.jetbrains.com/phpstorm/help/configuring-xdebug.html

https://confluence.jetbrains.com/display/PhpStorm/Zero-configuration+Web+Application+Debugging+with+Xdebug+and+PhpStorm

Any guidance on this would be great.

Thanks,

Sam

1
Your XAMPP may use different php.ini for CLI and Apache. Put <?php phpinfo(); in test.php file and execute it via browser and CLI -- the config file used will be in the header table. - LazyOne
@LazyOne Thanks for the responce, I did that and it is using the php.ini in my XAMPP directory. - Sam Roberts
So .. does xdebug section listed there .. and the settings are correct? - LazyOne
@LazyOne There isn't a Xdebug section in the 'phpinfo();' but in the interpreter it says there is a debugger installed. Not sure why one is working fine and the other isn't. - Sam Roberts
Well ... it has to be in phpinfo output if it's installed. Possibly the interpreter uses completely different PHP installation (you may have more than one on your computer). - LazyOne

1 Answers

2
votes

Check if the correct extension are loaded using the following command in the PHPStorm terminal

php -i | grep xdebug

You might want to check to make sure you're loading the correct php.ini file as well, by using

php -i | grep ini