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
On this page of the site you can watch the video online php xdebug windows10 vscode xdebug behind company firewall to debug php files on remote linux server with a duration of hours minute second in good quality, which was uploaded by the user emailform 03 August 2017, share the link with friends and acquaintances, this video has already been watched 1,589 times on youtube and it was liked by 4 viewers. Enjoy your viewing!