2013-08-28 105 views
1

我有一个Windows 7机器与XAMPP(Apache 2.4.4 - Win32的PHP 5.4.16)和PHPStorm 6.0.3对于我的生活,我不能让XDebug在这台机器上工作!我看我的phpinfo页: enter image description hereXAMPP PhpStorm XDebug不会停在断点

这告诉我,我需要下载了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吗?

+1

'xdebug.remote_enable = 1' – CrazyCoder

+1

** 1)**您肯定有错误的xdebug版本。你为什么在你的PHP是32位的时候使用** 64位** xdebug(你的Apache也是32位的(Win32))。 ** 2)** xdebug已关闭/禁用('xdebug.remote_enable'应为** 1/true/on ** – LazyOne

+0

好的,我如何确定我的php是否是32位?我看到remote_enable并更改了它到1我运行的是Window 7,并且它说的是64位版本。我如何确定Apache是​​32位还是64位? –

回答

1

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

zend_extension =“C:\ xampp \ php \分机\ php_xdebug-2.2.3-5.4-vc9.dll” - 去除zend_extension_ts

0

的_TS在附加:
.DLL Xdebug的文件 检查安全选项。如果您在文件的图标上看到小锁图标 - 除您无法使用此文件外,没有其他人。在这种情况下,请在文件属性中的安全选项卡中添加用户组。

0

顺便说一句,你应该尝试去php.ini并删除这样

extension=php_xdebug-... 

这不是一个很好的理由,把Xdebug的文件,这里

C:\xampp\php\ext\ 
线

更好的路径是

C:\xampp\php\zend_extension\ 

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

0

(这是适用于Mac,但写的与Windows大多工作)

的混乱可能来自的PHP的服务器使用。例如,Mac OS X有一个,也许有一个来自“brew install ...”,而XAMPP就是其中之一。

  1. 确定您的计算机上PhpStorm正在使用哪个PHP。这是需要XDebug的。让我们使用XAMPP的PHP。为了找到它,

    <?php phpinfo();?> 
    

    凡说_SERVER["_"](在我的Mac是_SERVER["_"] => /Applications/XAMPP/xamppfiles/bin/php)。

  2. 它有XDebug吗? (从上面的phpinfo();输出中搜索'xdebug'。)Mine是。

    Search for xdebug in the phpinfo output

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

    • 还要加右下面的步骤此行xdebug.remote_enable = 1 8的,这样的XDebug总是会听曾告诉这样做!

  4. 重新启动XAMPP。

  5. 下载XDebug Chrome extension

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

  7. 转到PhpStorm这样的喜好和选择正确的“PHP语言级别”,然后点击旁边的“CLI解释”的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

刷新页面重新加载页面,它应该在它击中了你的第一个断点停止。