Step 1: on AWS ubuntu linux, install and enable xdebug to php.ini
[xdebug]
zend_extension=xdebug.so
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_connect_back=on
xdebug.remote_port=9001
xdebug.remote_log=/home/raymond/xdebug.log
xdebug.remote_connect_back=1
Step 2: on AWS ubuntu linux, run php built-in web server
php -S localhost:8988 -t /home/raymond/www/webroot/ -c /etc/php5/cli/php-raymond.ini
Step 3: on windows 10, run vscode, and config php xDebug launch.json:
localSourceRoot and serverSourceRoot seems MUST be the same folder mapping, only add "c:" to the localSourceRoot
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"localSourceRoot": "c:/home/raymond/www/webroot/",
"serverSourceRoot": "/home/raymond/www/webroot/",
"port": 9001
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9000
}
]
}
Step 4: on windows 10, config putty to use 2 port forwardings (2 tunnels) to ssh to AWS ubuntu linux server:
Config 2 port tunnels:
1) L8988, forward local 8988 to remote 8988
2) 4R9001, reverse remote port 9001to local 9001, FOR vscode, OTHERWISE php xdebug server can NOT connect vscode xdebug clicnt
Step 5: on windows 10, in vscode editor, set breakpoints, and run php xdebug
На этой странице сайта вы можете посмотреть видео онлайн php xdebug windows10 vscode xdebug behind company firewall to debug php files on remote linux server длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь emailform 03 Август 2017, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 1,589 раз и оно понравилось 4 зрителям. Приятного просмотра!