[英]Xdebug is not running with WAMP
我的系統是
我安裝了 xdebug dll ,就像https://xdebug.org/docs/install中提到的那樣。
php.ini:
[xdebug]
zend_extension=F:\wamp64\bin\php\php5.6.25\ext\php_xdebug-2.5.0-5.6-vc11-x86_64.dll
我查看了 php.ini 並找到了 zend-Logo 和這個
編譯器 MSVC11 (Visual C++ 2012)
...
該程序使用 Zend 腳本語言引擎:
Zend Engine v2.6.0,版權所有 (c) 1998-2016 Zend Technologies
使用 Xdebug v2.5.0,版權所有 (c) 2002-2016,作者 Derick Rethans
我在https://xdebug.org/wizard.php運行測試並得到
Summary Xdebug installed: no Server API: Command Line Interface Windows: yes - Compiler: MS VC11 - Architecture: x64 Zend Server: no PHP Version: 5.6.25 Zend API nr: 220131226 PHP API nr: 20131226 Debug Build: no Thread Safe Build: yes Configuration File Path: C:\WINDOWS Configuration File: F:\wamp64\bin\php\php5.6.25\php.ini Extensions directory: F:\wamp64\bin\php\php5.6.25\ext
我在命令行中運行php -m
發現沒有 xdebug 模塊
[PHP Modules] bcmath bz2 calendar calendar Core ctype curl date dom ereg exif fileinfo filter ftp gd gettext gmp hash iconv imap intl json ldap libxml mbstring mcrypt mhash mysql mysqli mysqlnd odbc openssl pcre PDO pdo_mysql pdo_sqlite Phar Reflection session shmop SimpleXML soap sockets SPL sqlite3 standard tokenizer wddx xml xmlreader xmlrpc xmlwriter xsl zip zlib [Zend Modules]
現在我真的不知道出了什么問題以及我可以做什么來使用 xdebug。 尋找一些有用的想法。
WAMPServer 已經安裝了 XDEBUG。 但僅在 Apache 使用的php.ini
中。
如果您希望它可用於 PHP CLI,那么您所要做的就是
wampmanager->php->php.ini
打開wampmanager->php->php.ini
然后它也可以在 PHP CLI 中工作
如果您想要最新版本的 XDEBUG,請訪問http://wampserver.aviatechno.net/並下載 XDEBUG ADDON Update xDebug 2.5.0 32 bit x86
或Update xDebug 2.5.0 64 bit x64
具體取決於您使用的 WAMPServer 版本已安裝(32 或 64 位)
您還可以在Wampserver update 3.0.8
下載最新版本的 WAMPServer Wampserver update 3.0.8
,這只是升級 WAMPServer 控制代碼,而不是任何版本的 APACHE、MYSQL 或 PHP。
但是那里也有可用的插件,可以添加最新版本的 Apache、Mysql 和 PHP 以及最新版本的 phpMyAdmin/Sysinfo 和 Adminer
我建議你擺脫你下載的任何版本的 XDEBUG
如果調試器仍然無法工作,請確保您在 php.ini 文件中啟用了 xdebug.remote_enable。
只需執行以下步驟
轉到運行 greenIcon->Php->php extensions->zend extensions->選擇已安裝的 php_xdebug_version 的服務。
在轉到 php.ini 文件搜索 [opcache] -> 下面 [opcache] 行注釋 zend_extension。 然后保存
重啟服務。
1- 使用 wampmanager->php->php.ini 打開 php.ini
2- Go 到 php.ini 文件的底部
3- 編輯 \wamp\bin\php\php{version}\php.ini (無論您使用哪個版本,或所有版本)
4- 將 [xdebug] 部分粘貼到文件底部
[xdebug]
zend_extension="c:/wamp64/bin/php/php8.1.0/zend_ext/php_xdebug-3.1.1-8.1-vs16-x86_64.dll"
xdebug.mode = debug
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.start_with_request = yes
xdebug.client_host = "127.0.0.1"
5- 保存 php.ini
6-重啟wamp服務器
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.