[Video Tutorial] PHP configuration vscode of auto-complete tips for remote debugging using Xdebug debug

Vscode default downloaded and installed can not accurately detect hints and PHP syntax errors, you need to manually specify what PHP program path of the machine. After operating in the following configuration syntax for errors can be detected in time to save the file.
Open File -> Preferences -> setting, the PHP execution path filled in, provided that the machine has been installed the PHP
{
"workbench.sideBar.location": "left",
"php.suggest.basic": false,
"php.validate.executablePath": "/ usr / bin / PHP"
}


Configuration of PHP automatically prompts, and we simply can not meet the testing grammar, but also can auto-complete code and libraries prompt
start VS Code quickly open (Ctrl + P), paste the following command, and then press Enter.
ext install felixfbecker.php-intellisense

Use vscode debug the first to install xdebug, fpm forwards the request to pass over to the local vscode 9000 port
apt-get install php-xdebug

Enable local script debugging
/etc/php/7.3/cli/php.ini:
[XDebug]
xdebug.remote_enable = 1
xdebug.remote_autostart = 1

Remote debugging Web site:
modify the configuration of performing online fpm xdebug, remote_host is the IP of the machine
[XDebug]
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.remote_host = 172.17.0.1
xdebug.remote_port = 9000

The detailed operation of video recording address steps:

 https://www.bilibili.com/video/av71103179/

Guess you like

Origin www.cnblogs.com/taoshihan/p/11667039.html