curl调用减慢了PhpStorm中的调试器

时间:2015-01-21 15:36:36

标签: php debugging curl phpstorm xdebug

我在wamp服务器上使用PhpStorm的PHP远程调试配置和PHP xDebug扩展,这很好用。

然而,当有curl_exec调用时,我注意到了一个问题,它应该调用我的虚拟API,也是项目的一部分。问题是,在curl_exec调用之后,调试器将跳转到API方法中定义的breakpont之前有大约30秒的超时时间。这可能更有意义:

    index.php                API
-----------------     --------------------
|                 |   |   API_Method() {  |
|  curl_exec( )   | ->|     breakpoint    |
|                 |   |    }              |
 -----------------     -------------------

不使用调试,curl会自动从API_Method()返回结果,应用程序运行正常。但是当我在API_Method()中设置一个断点时,我必须等待大约30个secons,然后调试器跳转到那个变得烦人的断点。这是xdebug配置:

[xdebug]

debug.remote_host
xdebug.remote_enable = 1
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "c:/wamp/tmp"
xdebug.show_local_vars=0
xdebug.idekey="PHPSTORM"
xdebug.remote_autostart = 1
debug.remote_host= 192.168.23.55
xdebug.trace_output_name = cachegrind.out.%p
xdebug.remote_port= 9000

有解决方法吗?

0 个答案:

没有答案