PHPStorm 9 + XAMPP + xdebug,调试器不工作

标签 php xampp phpstorm xdebug

尽管一步一步遵循了所有教程,断点和 php 调试仍然不起作用。

这是我的设置:

PHPStorm 9.0.2,服务器位于“C:/Users/hedge/Dev/PHPStorm/gpstudios/dist”

带有 xdebug 2.3.3-5.6-vc11 的 XAMPP

php.ini:

[XDebug]
zend_extension = "C:\Dev\XAMPP\php\ext\php_xdebug-2.3.3-5.6-vc11.dll"
xdebug.remote_enable = 1
xdebug.remote_host = 127.0.0.1
xdebug.remote_connect_back = 1
xdebug.remote_port = 9000
xdebug.idekey = "PHPSTORM"
xdebug.profiler_enable = 1
xdebug.remote_log = "C:\Dev\XAMPP\tmp\xdebug.log"

httpd-vhosts.conf:

<VirtualHost *:80>
    DocumentRoot "C:/Users/hedge/Dev/PHPStorm/gpstudios/dist"       
    ServerName local.gpstudios

    <Directory "C:/Users/hedge/Dev/PHPStorm/gpstudios/dist">        
        Header set Cache-Control "max-age=0, private, no-store, no-cache, must-revalidate"      
        Header set Pragma "no-cache"        
        Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"      
        Options Indexes FollowSymLinks Includes ExecCGI     
        AllowOverride All       
        Require all granted     
    </Directory>        
</VirtualHost>

主机:

127.0.0.1           local.gpstudios

Jetbrains IDE 支持(Chrome):

enter image description here

在 phpstorm 中,当我在 phpstorm 中运行“Web 服务器调试验证”时:

enter image description here

我尝试将 xdebug.remote_host 设置为“local.gpstudios”,但仍然没有帮助。

我在 Debug模式下运行 phpstorm 并启用“监听 php 调试连接” 'C:\Dev\XAMPP\tmp\xdebug.log' 永远不会被创建。

如果我将“xdebug.remote_autostart = 1”行添加到 php.ini,php 调试就可以工作了!!!但是当我使用 phpmyadmin 时,它运行得很慢,我不想考虑使用这个解决方法。 我已经尝试了一切,查看了大量类似的 stackoverflow 问题。没有什么。翻转。有效。

请帮忙,我知道有一个快速的解决方法,但它确实使 phpmyadmin 非常慢。我不应该设置remote_autostart...真的为此抓狂。

最佳答案

如果没有 xdebug.remote_autostart = 1 选项,您必须为每个域启用 xdebug。您可以通过向要调试的站点添加新书签来完成此操作。

作为辅助工具,我可以推荐以下工具:

关于PHPStorm 9 + XAMPP + xdebug,调试器不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32400054/

相关文章:

xdebug - phpStorm,xdebug : is there a way to exclude certain directories from debugging?

php - PHP和SEO认证

javascript - 客户端脚本中的服务器端变量

mysql - XAMPP MySql PHPMYAdmin

mysql - 无法连接到 XAMPP MySQL

php - Xampp Zend_Mail_Protocol_Exception:无法找到套接字传输“ssl”-library\Zend\Mail\Protocol\Abstract.php:277

找不到 PhpStorm CodeIgniter 类

php - 在 SugarCRM CE 中编辑潜在客户转换页面

php - 使用 PHP 选择并配对两个用户

javascript - 如何在 PhpStorm 或 WebStorm 中逐行运行 JavaScript 代码?