![](/img/trans.png)
[英]How to use Xdebug with Laravel on Nginx with PHPStorm on Mac?
[英]How to setup XDebug properly in PhpStorm for Laravel web app that run in Vagrant? (Mac OS X)
我使用precise64
盒子在Vagrant內運行我的Laravel Web應用程序。
在vagrant box中:在目錄/etc/apache2/sites-available
,我有000-default.conf
和laratest.conf
文件。 我現在只對laratest.conf
感興趣。
在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>
在/etc/php5/apache2/
目錄下的php.ini
文件中:
[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
所以,我使用laratest.dev
url訪問我的laravel web
在PHPStorm -> Preferences -> Project Settings -> PHP -> Servers
,下圖是我的設置:
我已經在PHP Debug Connection(電話圖標)中啟用了監聽器並設置了一個斷點。 我運行網絡時斷點設法命中,但它給出了這個錯誤:
我的設置有什么問題嗎? 特別是映射。 我已經嘗試了很多東西和谷歌搜索,仍然無法正常調試
事實證明,這是我需要使其正常工作的映射
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.