-
Install Xampp and copy PHP.info page.
-
Go to https://xdebug.org/wizard and paste the PHPinfo (of your local computer) content in the textarea.
-
Press the button analyze.
-
Download php_xdebug-2.7.2-7.3-vc15-x86_64.dll and copy it into xampp/php/ext
-
Add the following content to php.ini file
[XDebug] xdebug.mode = debug xdebug.start_with_request = yes xdebug.client_port = 9000 zend_extension = "C:\xampp\php\ext\php_xdebug-2.7.2-7.3-vc15-x86_64 .dll"
-
Restart Apache service.
-
Add the following content to settings.json in vs code.
"php.validate.executablePath": "c:\\xampp\\php\\php.exe"
-
Install PHP debug extension. (Go to extensions tab in vs-code)
-
Add launch.json in vs code.
Add xdebug configuration in both /opt/lampp/etc/php.ini and /etc/php/{version}/cli/php.ini
Add this to ignore vendor files in launch.json
"ignore": [
"**/vendor/**/*.php"
]