xmapp下设置xdebug

Starting with version 1.7, XAMPP includes the XDebug PHP debugger, but it needs to be configured for use. To do that, we will edit the "php.ini" file to configure XDebug. The "Loaded Configuration File" in the screenshot above tells you what "php.ini" file is being used. For Windows, this is normally "c:\xampp\apache\bin\php.ini".

Important note for Windows 7 & Vista users: As of August 2013 (XAMPP version 1.8.2), the file "php_xdebug.dll" that is included with XAMPP now works with Windows 7 & Vista. In some earlier versions of XAMPP, the distributed version of XDebug did not work correctly. The symptom of this earlier problem was that the Apache server would stop if this version of XDebug is loaded. To check that you are running the correct version of XDebug on your system, follow these instructions on the XDebug site.

We need to edit this file to configure XDebug as follows:

  1. Find the line "implicit_flush" and set it as follows:
    implicit_flush = On
    
  2. Find the section called "[Zend]" and comment out all of the lines by putting a semi-colon (";") at the start of each line.
  3. Find the line: zend_extension = "c:\xampp\php\ext\php_xdebug.dll" and uncomment it out.
  4. Find the "[XDebug]" section and uncomment out all of the lines (except for the first comment line). For Windows, it should look like the example below:
[XDebug]
;; Only Zend OR (!) XDebug
zend_extension_ts="C:\xampp\php\ext\php_xdebug.dll"
xdebug.remote_enable=true
xdebug.remote_host=localhost
xdebug.remote_port=10000
xdebug.remote_handler=dbgp

You do not need to enable XDebug profiling to use XDebug to debug Joomla code. Profiling allows you to find performance bottlenecks in your PHP code. However, enabling profiling with XDebug can slow down your system substantially, so it is not recommended unless you need it. To enable XDebug profiling, add these entries to your php.ini file.

xdebug.profiler_enable=1
xdebug.profiler_output_dir="C:\xampp\tmp"

For Windows 7 & Vista, you will use the file downloaded from the XDebug site. So the first line will be

zend_extension_ts="C:\xampp\php\ext\php_xdebug-2.0.0-5.2.2.dll"

For PHP version 5.3 or later, the "_ts" has been dropped, so the first line will read

zend_extension="C:\xampp\php\ext\php_xdebug.dll"

In XAMPP 1.7.3 on Windows 7 (currently not verified/tested with prior Windows versions), XDebug may not work correctly if the path to the DLL file is in quotes. In this case, the line should be

zend_extension = C:\xampp\php\ext\php_xdebug-2.1.0-5.3-vc6.dll
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值