ubuntu 安装xdebug

本文介绍如何在Ubuntu 14.04上安装XDebug并配置PHP进行调试。首先使用sudo apt-get install php5-xdebug安装XDebug,然后更新/etc/php5/apache2/php.ini文件中的配置选项,包括设置远程调试等参数。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Add XDebug to Ubuntu 14.04

It's pretty easy to add XDebug to Ubuntu for PHP and HTML5 Development.  Here's a recipe:

First, install XDebug, this assumes you already have a LAMP stack installed with Apache, PHP, MySQL:

  • sudo apt-get install php5-xdebug

This installed the latest version, which is 2.2.3 at this time.  Now update the options in PHP.INI - /etc/php5/apache2/php.ini 

  • # Added for xdebug
    zend_extension="/usr/lib/php5/20121212/xdebug.so"
    xdebug.remote_enable=1
    xdebug.remote_handler=dbgp xdebug.remote_mode=req
    xdebug.remote_host=127.0.0.1 xdebug.remote_port=9000

Restart Apache2, and you are ready to go!

  • sudo service apache2 restart
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值