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 phpize
and php-config
, take the following steps:
-
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.
-
cd xdebug-3.0.2
-
phpize (这一步,用对应版本的phpize , 如:/opt/PHP-5.6/bin/phpize)
If phpize is not in your path, please make sure that it is by expanding the
PATH
environment 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. -
./configure --enable-xdebug
-
make
-
make install
Configure PHP
-
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 |
————————————————————————————————————————
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 25岁的心里话
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 按钮权限的设计及实现
2019-01-07 mongoose系列——几行代码实现CRUD
2016-01-07 配置 php-fpm 监听的socket