XDebug using Laravel 5.2 PHP7 phpStorm 10 on Homestead not starting

Using the latest and greatest Laravel 5.2 Homestead VM and trying to install xDebug with my latest and greatest phpStorm 10. I inserted my php-i results here http://xdebug.org/wizard.php and followed the instructions for downloading, installing and setting up the correct version of xDebug. I use Chrome, and the xDebug extension is installed in Debug and uses IDE = phpStorm.

I should just run phpStorm https://drupalize.me/videos/zero-configuration-debugging-phpstorm?p=2017 and set a breakpoint and just start listening to the debug connection.

I read several of these StackOverflow posts about similar configurations and have spent several hours still trying to diagnose on my own with no luck. The phpStorm debugger just doesn't start from Chrome.

A pointer to the installation instructions that will work will be perfect, or I'm glad to publish all my xDebug / php.ini settings to diagnose the problem.

Thanks in advance.

+4
source share
2 answers

Answering my own question, after some research, the following correction was revealed:

I needed to create a file ...

$ sudo nano /etc/php/7.0/fpm/conf.d/20-xdebug.ini

with the following properties ...

zend_extension=xdebug.so

xdebug.remote_enable = 1
xdebug.remote_connect_back = 1
xdebug.remote_port = 9000
xdebug.scream=0 
xdebug.cli_color=1
xdebug.show_local_vars=1
+3
source

, , destroy/up.

#!/bin/sh
# I heard you like xdebug

echo "*********************************************************"
echo "********** XDEBUG FOR Homestead/PHP7 SETUP **************"

echo "** Inserting xdebug.ini configuration settings **" 
cat << XDEBUG | sudo tee /etc/php/7.0/mods-available/xdebug.ini
; configuration for php xdebug module
; priority=20
zend_extension=/usr/lib/php/20151012/xdebug.so
xdebug.idekey="phpstorm"
xdebug.remote_enable=1
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.max_nesting_level=300
xdebug.scream=0
xdebug.cli_color=1
xdebug.show_local_vars=1
xdebug.remote_autostart=1
XDEBUG

echo "** Restarting php7.0-fpm **" 
sudo service php7.0-fpm restart
0

Source: https://habr.com/ru/post/1623862/