[英]PhpStorm & XAMPP - debugging not starting
I am having a hard time with PhpStorm debugger.我很难使用 PhpStorm 调试器。 I read all their documentation and I have setup debug properly (according to both
phpinfo()
, debug tailored installation report and PhpStorm analysis).我阅读了他们的所有文档,并正确设置了调试(根据
phpinfo()
、调试定制安装报告和 PhpStorm 分析)。
However, no matter what I try, the debugger wont trigger.但是,无论我尝试什么,调试器都不会触发。
My setup is the following:我的设置如下:
I changed XAMPP document root to: c:\\src\\project\\www
我将 XAMPP 文档根目录更改为:
c:\\src\\project\\www
My project has the following structure:我的项目具有以下结构:
project
| www (used by XAMPP to serve the website)
| src
| --theme (symlinked to wp-content/themes)
| --plugins (symlinked to wp-content/plugins)
and apparently, this setup works as all my plugins and theme are correctly working and displayed on the screen.显然,这个设置可以正常工作,因为我所有的插件和主题都可以正常工作并显示在屏幕上。
When I then start to run the debugger, it simply won't trigger.然后当我开始运行调试器时,它根本不会触发。
This is the setup for the debugger on PhpStorm:这是 PhpStorm 上调试器的设置:
Server:服务器:
Host: localhost
Port: 80
Debugger: xdebug
Mappings (where I think there's something off)映射(我认为有问题的地方)
src/theme --> c:/src/project/www/wp-content/theme/
src/plugins --> c:/src/project/www/wp-content/plugins/
but nothing happens.但什么也没发生。 No mappings errors, no debug, nothing at all.
没有映射错误,没有调试,什么都没有。
Can you please explain to me what am I doing wrong here?你能解释一下我在这里做错了什么吗?
let me know if you need more info.如果您需要更多信息,请告诉我。
EDIT:编辑:
php.ini added line for debug (from xdebug website): php.ini 添加了调试行(来自 xdebug 网站):
zend_extension = C:\xampp\php\ext\php_xdebug-2.5.4-7.1-vc14.dll
PhpStorm PHP settings: PhpStorm PHP 设置:
This is from my setup : 这是从我的设置:
php.ini php.ini中
[xdebug]
;zend_extension=xdebug.so
zend_extension=/usr/local/Cellar/php55-xdebug/2.4.0/xdebug.so
xdebug.remote_enable=1
xdebug.remote_connect_back=0
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9002
xdebug.remote_log="/mnt/log/xdebug.log"
xdebug.remote_autostart=1
xdebug.idekey=phpstorm
xdebug.remote_mode = req
phpstorm : phpstorm:
setup in accordance with above parameters. 按照上述参数进行设置。 Note that I use port 9002 to skit around a conflict with
php-fpm
which is part of my stack. 请注意,我使用端口9002来解决与
php-fpm
的冲突,这是我的堆栈的一部分。 Also, i force xdebug logging on a specific drive to ease the burden on my laptop SSD, etc ... Adapt to your configuration. 另外,我强制xdebug登录到特定的驱动器上,以减轻笔记本电脑SSD等的负担...适应您的配置。
没有人说,但您可能需要添加到 xampp/xamppfiles/etc/php.ini:
xdebug.mode=debug,develop
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.