如题所述, 我在php代码中需要调用接口,接口也是localhost的,是采用fsockopen模拟POST来调用,我在接口里打了断点,但是通过netbeans+xdebug无法进入断点。
  如果设置了xdebug.autostart=1,fsockopen的请求就会超时,没有任何返回结果; 
  如果设置xdebug.autostart=0,fsockopen的请求会马上返回正确结果;
  总之,就是不管怎么设置,都无法进入接口的断点。
  除了接口,其它情况下,xdebug都能正常运行,请问谁知道怎么解决这个问题吗?

解决方案 »

  1.   

    你用的环境正好和我的一样,你看看我的php配置文件,希望对你有帮助哈。
    [XDebug]
    zend_extension = "c:\xampp\php\ext\php_xdebug-2.5.5-5.6-vc11.dll"
    ;zend_extension = "c:\xampp\php\ext\php_xdebug.dll"
    xdebug.profiler_append = 0
    xdebug.profiler_enable = 0
    xdebug.profiler_enable_trigger = 0
    xdebug.profiler_output_dir = "c:\xampp\tmp"
    ;xdebug.profiler_output_name = "cachegrind.out.%t-%s"
    xdebug.remote_enable = 1
    xdebug.remote_handler = "dbgp"
    xdebug.remote_host = "127.0.0.1"
    xdebug.remote_log = "c:\xampp\tmp\xdebug.txt"
    xdebug.remote_port = 9000
    xdebug.trace_output_dir = "c:\xampp\tmp"
    ; 3600 (1 hour), 36000 = 10h
    xdebug.remote_cookie_expire_time = 36000
      

  2.   

    接口里面?你要调试啥?tcpdump ? 简单的方法就是在相应的地方加日志啊