-
Notifications
You must be signed in to change notification settings - Fork 0
02. Setting Up Xdebug on VSCode
Daniel Trolezi edited this page Sep 11, 2024
·
4 revisions
Xdebug is already installed and configured with develop
, debug
and coverage
modes enabled by default.
To enable VSCode integration follow the steps bellow:
-
Install PHP Debug plugin: https://marketplace.visualstudio.com/items?itemName=xdebug.php-debug
-
Click on "Run and Debug" tab on VSCode and add new configuration in
launch.json
file:
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9003,
"pathMappings": {
"/var/www/laravel-app": "${workspaceRoot}"
}
}
-
Debug session will start by trigger.
Add?XDEBUG_TRIGGER
in the query string of your request and start listening on VSCode by clickin on "Start Debbuging", or press F5. -
Additionaly, You can install Xdebug helper for Chrome instead of adding the trigger manually every time.