How to: Visual Studio Code + XDebug (remote)

Vit Tertiumnon
Jan 23 · 1 min read

Remote server

Find your php.ini:

php -i | grep php.ini

Add next lines:


Add XDebug extension to your browser and enable it (“debug” icon).

Visual Studio Code

{"name": "remote XDebug","type": "php","request": "launch","port": 9000,"pathMappings": {"/var/www/your-site": "${workspaceRoot}",}},

Then start debugging process and refresh browser page when your site is opened.

Software Designer

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade