16
XAMPP - XDebug Setup for PHP 8
source link: https://odan.github.io/2020/12/03/xampp-xdebug-setup-php8.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
XDebug Setup for PHP 8
Daniel's Dev Blog
Developer, Trainer, Open Source Contributor
Blog About me DonateXAMPP - XDebug Setup for PHP 8
Daniel Opitz
03 Dec 2020
Requirements
Setup
- Download Xdebug for the specific PHP version:
- PHP 8.0 (64-Bit): https://xdebug.org/files/php_xdebug-3.0.0-8.0-vs16-x86_64.dll
- Move the downloaded dll file to:
C:\xampp\php\ext
- Rename the dll file to:
php_xdebug.dll
- Open the file
C:\xampp\php\php.ini
with Notepad++ - Disable output buffering:
output_buffering = Off
- Scroll down to the
[XDebug]
section (or create it) and copy/paste these lines:
[XDebug]
zend_extension=xdebug
xdebug.mode=debug
xdebug.start_with_request=yes
- Restart Apache
PhpStorm
- Change the Debug port from 9000 to 9003 and enable the Xdebug option: “Can accept external connections”. Screenshot
- Use the PhpStorm bookmarklets generator to activate Xdebug from the browser side.
Netbeans
- Change the Netbeans debugging options: Screenshot
Visual Studio Code
Postman
Add XDEBUG_SESSION_START=PHPSTORM
as query parameter to the url, e.g.
- http://localhost?XDEBUG_SESSION_START=PHPSTORM
Start debugger from the console
Enter cmd:
set XDEBUG_CONFIG="idekey=xdebug"
php test.php
Known Issues
© 2020 Daniel Opitz | Twitter
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK