IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> PHP知识库 -> windows下安装xdebug记录 -> 正文阅读

[PHP知识库]windows下安装xdebug记录

查看php适合哪个版本

我在这里是踩过坑的,始终不行,确定了php版本,是否线程安全,32位还是64架构,都对上了,但是还是不对。提示如下错误:

[23-Mar-2022 09:24:46 UTC] PHP Warning:  Failed loading Zend extension 'xdebug-3.1.3-7.4-vc15-x86_64' (tried: D:/laragon/bin/php/php-7.4.19-Win32-vc15-x64/ext\xdebug-3.1.3-7.4-vc15-x86_64 (找不到指定的模块。), D:/laragon/bin/php/php-7.4.19-Win32-vc15-x64/ext\php_xdebug-3.1.3-7.4-vc15-x86_64.dll (找不到指定的模块。)) in Unknown on line 0

文件位置及配置都没问题,但是一直报错。

正确的做法是,在命令行输入:

php -i > phpinfo.txt

拿到php的所有信息,然后把上面信息输入到方框中:
https://xdebug.org/wizard

在这里插入图片描述
结果我这边提示:
在这里插入图片描述
瞬间感觉很坑爹,部分版本由于缺少组件,不能支持。。。

于是,我们需要换个版本的php。
https://windows.php.net/download

下载8.1版本和7.4.28版本,都下下来试试。

安装配置xdebug

换了版本以后,提示就很明晰拿了,需要下载那个版本的xdebug,怎么配置。

Installation Wizard
Summary
Xdebug installed: no
Server API: Command Line Interface
Windows: yes
Compiler: MS VC15
Architecture: x64
Zend Server: no
PHP Version: 7.4.28
Zend API nr: 320190902
PHP API nr: 20190902
Debug Build: no
Thread Safe Build: yes
OPcache Loaded: no
Extensions directory: D:\laragon\bin\php\php-7.4.28-Win32-vc15-x64\ext
Instructions
Download php_xdebug-3.1.3-7.4-vc15-x86_64.dll
Move the downloaded file to D:\laragon\bin\php\php-7.4.28-Win32-vc15-x64\ext, and rename it to php_xdebug.dll
Update D:\laragon\bin\php\php-7.4.28-Win32-vc15-x64\php.ini and add the line:
zend_extension = xdebug
Enabling Features
Now Xdebug is installed, you can enable its features. Please refer to the dedicated sections in the documentation about information on how to enable and configure these Xdebug features. Where these sections refer to php.ini or similar, please remember to use D:\laragon\bin\php\php-7.4.28-Win32-vc15-x64\php.ini:

Development Helpers — help you get better error messages and obtain better information from PHP's built-in functions.
Step Debugging — allows you to interactively walk through your code to debug control flow and examine data structures.
Profiling — allows you to find bottlenecks in your script and visualize those with an external tool.

在这里插入图片描述

写入配置:

zend_extension = xdebug

[xdebug]
xdebug.remote_enable= 1
xdebug.remote_autostart = 1

检查拓展安装是否ok

php -m | grep xdebug

在这里插入图片描述
至此,xdebug安装正常。

  PHP知识库 最新文章
Laravel 下实现 Google 2fa 验证
UUCTF WP
DASCTF10月 web
XAMPP任意命令执行提升权限漏洞(CVE-2020-
[GYCTF2020]Easyphp
iwebsec靶场 代码执行关卡通关笔记
多个线程同步执行,多个线程依次执行,多个
php 没事记录下常用方法 (TP5.1)
php之jwt
2021-09-18
上一篇文章      下一篇文章      查看所有文章
加:2022-03-30 18:02:46  更:2022-03-30 18:03:42 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年5日历 -2024/5/18 12:27:13-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码