【发布时间】:2013-09-02 05:52:18
【问题描述】:
我正在花时间让 xdebug 在 xampp 上工作。我正在尝试使用 phpStorm 在浏览器中调试 php。
我使用的是 Windows 7(64 位版本)。
我下载了适当版本的 Xdebug(我认为)。 PHP 5.4 VC9 TS(64 位)
把它放在 php.ini 中(和我的 phpinfo() 中的 php.ini 相同)
[XDebug]
zend_extension_ts = "\xampp\php\ext\php_xdebug-2.2.0RC1-5.4-vc9-x86_64.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable=on
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=”dbgp”
xdebug.trace_output_dir = "\xampp\tmp"
我之前编辑过 php.ini 以将默认 htdocs 更改为另一个位置(我不确定这是否会影响 xdebug)
另外,我看到许多此类问题的答案是使用 xdebug 向导。这对我不起作用 - 由于某种原因没有告诉我要下载哪个二进制文件。
【问题讨论】:
-
天哪,我真的希望就是这样。将我的 php.ini 更改为:
[XDebug] zend_extension = "C:\Program Files (x86)\xampp\php\ext\php_xdebug-2.2.3-5.4-vc9.dll" xdebug.profiler_append = 0 xdebug.profiler_enable = 1 xdebug.profiler_enable_trigger = 0 xdebug.profiler_output_dir = "C:\Program Files (x86)\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:\Program Files (x86)\xampp\tmp"但仍然没有乐趣 -
回显 PHP_INT_SIZE; //=> 4 所以这很有用,谢谢!
-
请阅读所有 cmets,尤其是前两个。
xdebug.remote_enable = 1(必须是 1/on 而不是 0/off)。并且不要忘记重新启动 Apache。