1. What to use Xdebug for?
2. How to use Xdebug?
- Update .env
PHP_FPM_INSTALL_XDEBUG=true
PHP_FPM_XDEBUG_PORT=9003
- Add /php-fpm/xdebug.ini
xdebug.client_host="host.docker.internal"
zend_extension=xdebug
xdebug.start_with_request=yes
xdebug.discover_client_host=on
- Rebuild php-fpm
docker compose up --build --force-recreate --no-deps -d php-fpm
- Update .vscode/launch.json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9003,
"log": true,
"pathMappings": {
"/var/www/cpweb": "${workspaceRoot}",
},
}
]
}
3. What does Xdebug include?
4. Compare way to use Laradock for 2 projects
-------------------------
Detailed instructions
No comments:
Post a Comment