XAMPP PhpStorm XDebug不会在断点处停止

时间:2013-08-28 15:11:15

标签: xampp xdebug phpstorm

我有一台装有XAMPP的Windows 7机器(Apache 2.4.4 - Win32 PHP 5.4.16)和PHPStorm 6.0.3对于我的生活,我无法让XDebug在这台机器上工作!我看看我的PHPInfo页面: enter image description here

这告诉我需要下载XDebug“PHP 5.4 VC9 TS(64位)”我下载并复制以生成:C:\xampp\php\ext\php_xdebug-2.2.3-5.4-vc9-x86_64.dll我的PHP.ini有:

[XDebug]
zend_extension_ts = "C:\xampp\php\ext\php_xdebug-2.2.3-5.4-vc9-x86_64.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 0
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.remote_port = 9000
xdebug.trace_output_dir = "C:\xampp\tmp"

我重新启动XAMPP,但PHPInfo页面中仍然没有XDebug?

4 个答案:

答案 0 :(得分:1)

回答我自己的问题不是我想要做的,而是我们走了。我发现我在32位模式下使用XAMPP - 我添加了echo PHP_INT_SIZE;到我的phpinfo.php页面的顶部,它返回4(32位)我下载了“PHP 5.4 VC9 TS(32位)”,但我的PHP.ini读了:

zend_extension =“C:\ xampp \ php \ ext \ php_xdebug-2.2.3-5.4-vc9.dll” - 从zend_extension_ts中删除_ts

答案 1 :(得分:0)

另外:
检查 .dll xdebug文件的安全选项。如果你在文件的图标上看到小锁图标 - 没有人除了你不能使用这个文件。在这种情况下,在文件属性的安全选项卡中添加Users组。

答案 2 :(得分:0)

顺便说一下,你应该尝试去php.ini并删除像这样的行

extension=php_xdebug-...

将Xdebug文件放在这里不是一个很好的理由

C:\xampp\php\ext\

更好的路径是

C:\xampp\php\zend_extension\

更多细节在这里" Xdebug - command is not available"

答案 3 :(得分:0)

(这适用于Mac,但主要用于Windows)

混淆可能来自您的服务器使用的PHP。例如,有Mac OS X,可能是“brew install ...”和XAMPP的一个。

  1. 确定您的计算机上PhpStorm使用的PHP。这是需要XDebug的。我们来使用XAMPP的PHP。要找到它,

    href = "https://en.wikipedia.org/wiki/Star_Wars" + link.get("href")
    TypeError: must be str, not NoneType  
    

    它所说的<nav class="navbar fixed-top navbar-light bg-faded"> <a class="navbar-brand d-inline-flex" href="#"> <img src="http://placehold.it/90x90" width="30" height="30" class="d-inline-block align-top" alt="Company's logo"> Company's name </a> <div class="navbar-nav"> <a href="#" class="btn btn-primary nav-item pull-right" role="button">Log In</a> </div> </nav>(在我的Mac上是<?php phpinfo();?> )。

  2. 它有XDebug吗? (从上面的_SERVER["_"]输出中搜索'xdebug'。)我的确如此。

    Search for xdebug in the phpinfo output

  3. 如果你不这样做,让我们安装吧!将phpinfo()输出的整个文本复制/粘贴到这个漂亮的XDebug wizard中。在我有XDebug之前,我的确有明确的指示:

    • 但是也要在第8步之后添加这一行_SERVER["_"] => /Applications/XAMPP/xamppfiles/bin/php,以便XDebug一旦听到就会一直听!

  4. 重启XAMPP。

  5. 下载XDebug Chrome extension

  6. 转到要调试的页面,然后从扩展程序图标中选择“调试”。

  7. 转到这样的PhpStorm首选项并选择正确的“PHP语言级别”,然后单击“CLI INTERPRETER”旁边的3个点,并将XAMPP的PHP路径放在“PHP可执行文件”字段中。它应该在右边说Xdebug版本。

    menus: phpstorm, then preferences, then Languages and Frameworks then PHP

  8. 转到这样的PhpStorm首选项并添加路径;对我来说他们是一样的,因为我的本地,但它仍然需要知道“这个页面,我正在打你的机器上的这个文件”。单击“确定”。

    menus: phpstorm, then preferences, then Languages and Frameworks, then servers

  9. 点击右上角的手机,然后在浏览器中重新加载页面

    button says Start listening for php debug connections

  10. 重新加载页面,它应该停在你遇到的第一个断点处。