Skip to content

Instantly share code, notes, and snippets.

@gayanhewa
Created August 22, 2017 07:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gayanhewa/29333b4a113821dd805c6c463c997e00 to your computer and use it in GitHub Desktop.
Save gayanhewa/29333b4a113821dd805c6c463c997e00 to your computer and use it in GitHub Desktop.
xdebug visual studio code using the php debug extension from felix
1. Remote VM must have xdebug running
vagrant@app:/etc/php/7.0/fpm$ cat conf.d/20-xdebug.ini
zend_extension=/usr/lib/php/20151012/xdebug.so
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_connect_back=1
xdebug.remote_port=9000
2. VSCode should have the below launch config.
launch.json
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000,
"log": true,
"serverSourceRoot": "/opt/app/vagrant_code",
"localSourceRoot": "${workspaceRoot}",
"stopOnEntry": true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment