2010年9月16日 星期四

Setting Debugging PHP with Xdebug

1. download xdebug 

2. copy xdebug's dll to php\ext\ (ex. C:\Program Files\PHP\ext)

3. modify php.ini add xdebug define (if xdebug's dll name is php_xdebug-2.0.5-5.2.dll)
    zend_extension_ts="C:\Program Files\PHP\ext\php_xdebug-2.0.5-5.2.dll"
    xdebug.remote_enable=1 
    xdebug.remote_handler=dbgp 
    xdebug.remote_host=127.0.0.1 
    xdebug.remote_port=9000 
    xdebug.remote_mode=req 
    xdebug.idekey=default 
    xdebug.remote_log="c:\tmp\xdebug\xdebug.log" 
    xdebug.show_exception_trace=0 
    xdebug.show_local_vars=9 
    xdebug.show_mem_delta=0 
    xdebug.trace_format=0 
    xdebug.profiler_enable  = 1 
    xdebug.profiler_output_dir ="c:\tmp\xdebug"

4. Make sure you create the folder c:\tmp\xdebug\

5. restart apache

6. look phpinfo()
  















Reference URL : http://www.webcheatsheet.com/php/debug_php_with_xdebug.php

沒有留言:

張貼留言