简体   繁体   English

通过安装向导安装 Xdebug

[英]Install Xdebug through Installation Wizard

Can someone help me with a next step?有人可以帮我下一步吗? Which software should I use and how do I go about?我应该使用哪个软件以及如何使用 go? What is RedHat?什么是红帽? I have XAMPP installed.我安装了 XAMPP。 I have searched some solutions but my case is a bit different.我已经搜索了一些解决方案,但我的情况有点不同。 Below is the output from Installation Wizard ( https://xdebug.org/wizard ).下面是安装向导中的 output ( https://xdebug.org/wizard )。 I do not know how to proceed from point "2.Install the pre-requisites for compiling PHP extensions."我不知道如何从“2.安装编译 PHP 扩展的先决条件”这一点开始。 and onwards.及以后。 在此处输入图像描述 Summary概括

Xdebug installed: no已安装 Xdebug:否

Server API: LiteSpeed V7.8 CloudLinux 1.2服务器 API:LiteSpeed V7.8 CloudLinux 1.2

Windows: no Windows:没有

Zend Server: no Zend 服务器:没有

PHP Version: 7.4.13 PHP 版本:7.4.13

Zend API nr: 320190902 Zend API 编号:320190902

PHP API nr: 20190902 PHP API 编号:20190902

Debug Build: no调试构建:否

Thread Safe Build: no线程安全构建:否

OPcache Loaded: yes已加载 OPcache:是

Configuration File Path: /opt/alt/php74/etc配置文件路径:/opt/alt/php74/etc

Configuration File: /opt/alt/php74/etc/php.ini配置文件:/opt/alt/php74/etc/php.ini

Extensions directory: /opt/alt/php74/usr/lib64/php/modules扩展目录:/opt/alt/php74/usr/lib64/php/modules

Instructions指示

1.Download xdebug-3.0.1.tgz 1.下载xdebug-3.0.1.tgz

2.Install the pre-requisites for compiling PHP extensions. 2.安装编译PHP扩展的先决条件。

On your RedHat system, install them with:在您的 RedHat 系统上,安装它们:

yum groupinstall "Development tools" && yum install php-devel autoconf automake

3.Unpack the downloaded file with tar -xvzf xdebug-3.0.1.tgz 3.用tar -xvzf xdebug-3.0.1.tgz下载的文件

4.Run: cd xdebug-3.0.1 4.运行: cd xdebug-3.0.1

5.Run: phpize (See the FAQ if you don't have phpize ). 5.运行: phpize (如果没有phpize ,请参阅常见问题解答)。

As part of its output it should show:作为其 output 的一部分,它应该显示:

Configuring for:
...
Zend Module Api No:      20190902
Zend Extension Api No:   320190902

If it does not, you are using the wrong phpize.如果没有,则说明您使用了错误的 phpize。 Please follow this FAQ entry and skip the next step.请按照此常见问题解答条目并跳过下一步。

6.Run: ./configure 6.运行:./ ./configure

7.Run: make 7.运行: make

8.Run: cp modules/xdebug.so /opt/alt/php74/usr/lib64/php/modules 8.运行: cp modules/xdebug.so /opt/alt/php74/usr/lib64/php/modules

9.Edit /opt/alt/php74/etc/php.ini and add the line zend_extension = /opt/alt/php74/usr/lib64/php/modules/xdebug.so 9.编辑/opt/alt/php74/etc/php.ini并添加行zend_extension = /opt/alt/php74/usr/lib64/php/modules/xdebug.so

Make sure that zend_extension = /opt/alt/php74/usr/lib64/php/modules/xdebug.so is below the line for OPcache.确保zend_extension = /opt/alt/php74/usr/lib64/php/modules/xdebug.so在 OPcache 的行下方。

10.Restart the webserver 10.重启网络服务器

You're reading the *nix (Linux) installation instructions.您正在阅读 *nix (Linux) 安装说明。

  1. Install link is at the top of the website.安装链接位于网站顶部。
  2. That brings you to https://xdebug.org/docs/install .这会将您带到https://xdebug.org/docs/install
  3. The eighth line on the page : Windows, with help from a wizard .页面第八行Windows, with help from a wizard
  4. Brings you to https://xdebug.org/wizard带你到https://xdebug.org/wizard
  5. With instructions to download files from https://xdebug.org/download .https://xdebug.org/download下载文件的说明。
  6. And to copy the contents of your php.ini file in the textarea at https://xdebug.org/wizard .并将php.ini文件的内容复制到https://xdebug.org/wizard的文本区域中。

After following those clear instructions you will need to restart your HTTP server or if you have no idea and don't mind a temporary mindless brute-force (for your current XP) just sacrilegiously reboot your computer.遵循这些明确的说明后,您将需要重新启动 HTTP 服务器,或者如果您不知道并且不介意临时无意识的蛮力(对于您当前的 XP),只需重新启动计算机即可。

Here is what is in my WAMP (Windows, Apache, MariaDB, PHP) server's php.ini file for XDebug:这是我的 WAMP(Windows、Apache、MariaDB、PHP)服务器的 XDebug 的php.ini文件中的内容:

[XDebug]
;When updating server dump phpinfo in to here to determine correct download: https://xdebug.org/wizard.php
zend_extension = "C:\MEDIA\INTERNET\WAMP\PHP\ext\php_xdebug-2.9.7-7.4-vc15-x86_64.dll"
xdebug.profiler_output_dir = "C:\MEDIA\INTERNET\WAMP\Apache\logs"
xdebug.profiler_append = On
xdebug.profiler_enable_trigger = On
xdebug.profiler_output_name = "callgrind.%R-%u.trace"
xdebug.trace_options = 1
xdebug.collect_params = 4
xdebug.collect_return = 1
xdebug.collect_vars = 0
xdebug.profiler_enable=0
xdebug.trace_output_dir = "C:\MEDIA\INTERNET\WAMP\Apache\logs"
html_errors = 0

If installed correctly you should be able to simply append ?XDEBUG_PROFILE to the end of a URL (from your local server).如果安装正确,您应该能够简单地将 append ?XDEBUG_PROFILE到 URL 的末尾(来自本地服务器)。 The files will be output to whatever you set for xdebug.profiler_output_dir (use quotes if there are spaces in your local file system's path).这些文件将是 output 到您为xdebug.profiler_output_dir设置的任何内容(如果本地文件系统的路径中有空格,请使用引号)。

To open the generated logs I recommend using QCacheGrind .要打开生成的日志,我建议使用QCacheGrind

If you get stuck leave a comment.如果您遇到困难,请发表评论。 It appears that you're likely having trouble concentrating because the vast majority of the instructions are very easy to access.看来您可能难以集中注意力,因为绝大多数说明都很容易访问。 Additionally you should make an attempt to find search the web before asking questions that are easy to find by...searching the web.此外,您应该尝试搜索 web,然后再通过...搜索 web 来提出易于找到的问题。 Good luck.祝你好运。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM