I have my Laravel web app run inside Vagrant, using precise64
box.
In vagrant box:
in directory /etc/apache2/sites-available
, I have 000-default.conf
and laratest.conf
file. I'm only interested in laratest.conf
right now.
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.ini
file from /etc/php5/apache2/
directory:
[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 access my laravel web with laratest.dev
url
In PHPStorm -> Preferences -> Project Settings -> PHP -> Servers
, the image below is my setup:
I already enable listener in PHP Debug Connection (Phone icon) and put a breakpoint. The breakpoint manage to hit when I run the web, but it give this error:
Is there anything wrong with my set up? Especially mapping. I have tried so many things and googling, still can't debug properly yet
PhpStorm supports the use of Xdebug in the Just-In-Time (JIT) mode so it is not attached to your code all the time but connects to PhpStorm only when an error occurs or an exception is thrown. Depending on the Xdebug version used, this operation mode is toggled through the following settings: Xdebug 2 uses the xdebug .
It turns out this is the correct mapping I needed to make it to works
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With