How to properly configure XDebug in PhpStorm for a Laravel web application that runs on Vagrant? (Mac OS X)

I have a Laravel web application inside Vagrant using a field precise64.

In a stray field: in the directory /etc/apache2/sites-availableI have a file 000-default.confand laratest.conf. I'm only interested laratest.conf.

Inside laratest.conf:

<VirtualHost *:80>
   ServerName laratest.dev
   ServerAlias www.laratest.dev
   ServerAdmin webmaster@localhost
   DocumentRoot /var/www/laratest/public

  <Directory /var/www/laratest/public>
    Options -Indexes +FollowSymLinks
    AllowOverride all
    Require all granted
  </Directory>     
</VirtualHost>

In my php.inifile from the directory /etc/php5/apache2/:

[xdebug]
zend_extension="./usr/lib/php5/some-number/xdebug.so"
xdebug.default_enable=1
xdebug.remote_log="/var/log/xdebug/xdebug.log"
xdebug.idekey="vagrant"
xdebug.remote_enable=1
xdebug.profiler_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_autostart=1
xdebug.remote_connect_back=1

So, I am accessing my laravel web with laratest.devurl

The PHPStorm -> Preferences -> Project Settings -> PHP -> Serversfollowing is my image: enter image description here

I already turned on the listener in PHP Debug Connection (phone icon) and set a breakpoint. The breakpoint is hit when I start the web, but it gives this error: enter image description here

- ? . googling,

+4
1

, ,

enter image description here

+8

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


All Articles