Created
August 22, 2017 07:54
-
-
Save gayanhewa/29333b4a113821dd805c6c463c997e00 to your computer and use it in GitHub Desktop.
xdebug visual studio code using the php debug extension from felix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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