簡體   English   中英

如何在PhpStorm中為在Vagrant中運行的Laravel Web應用程序正確設置XDebug? (Mac OS X)

[英]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.conflaratest.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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM