xdebug 远程调试

 

 

----------------------------------------------------

下面的链接下载对应版本的xdebug.

https://xdebug.org/download/historical

 

 

 

 

源码安装:https://xdebug.org/docs/install#linux

 

Installation From Source

Obtain

You can download the source of the latest stable release 3.0.2.

Alternatively you can obtain Xdebug from GIT:

git clone git://github.com/xdebug/xdebug.git

This will checkout the latest development version which is currently 3.1.0-dev. This development branch might not always work as expected, and may have bugs.

You can also browse the source on GitHub at https://github.com/xdebug/xdebug.

Compile

There is a wizard available that provides you with the correct file to download, and which paths to use.

You compile Xdebug separately from the rest of PHP. You need access to the scripts phpize and php-config. If your system does not have phpize and php-config, you will need to install the PHP development headers.

Debian users can do that with:

apt-get install php-dev

And RedHat and Fedora users with:

yum install php-devel

It is important that the source version matches the installed version as there are slight, but important, differences between PHP versions. Once you have access to phpizeand php-config, take the following steps:

 

  1. Unpack the tarball:

    tar -xzf xdebug-3.0.2.tgz

    You should not unpack the tarball inside the PHP source code tree. Xdebug is compiled separately, all by itself, as stated above.

  2. cd xdebug-3.0.2

  3. phpize (这一步,用对应版本的phpize , 如:/opt/PHP-5.6/bin/phpize)

    If phpize is not in your path, please make sure that it is by expanding the PATHenvironment variable. Make sure you use the phpize that belongs to the PHP version that you want to use Xdebug with. See this FAQ entry if you're having some issues with finding which phpize to use.

  4. ./configure --enable-xdebug

  5. make

  6. make install

Configure PHP

  1. Add the following line to php.ini:

    zend_extension=/wherever/you/put/it/xdebug

  

1

2

3

4

5

6

7

8

9

10

11

12

zend_extension = /opt/PHP-5.6/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so

 

xdebug.remote_enable=1

 

xdebug.remote_autostart = 1 ;这个配置是比较重要的一个配置

 

xdebug.remote_port=9013

xdebug.remote_log="/xdebug-log"

 

xdebug.remote_host="192.168.123.41" ;远程调试的ip地址,即你自己的本机ip

  

来源:https://www.cnblogs.com/oxspirt/p/14246986.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值