VScode远程连接主机
简单演示了一下vscode远程连接虚拟机的步骤
·
一、前期准备
1、Windows安装VSCode;
2、在VSCode中安装PHP Debug插件;
3、安装好Docker
4、在容器中安装Xdebug
①写一个展现phpinfo的php文件
<?php
phpinfo();
?>
②在浏览器上打开该文件
③复制所有信息丢到Xdebug: Installation instructions result
④提交之后会给出合适的版本并给出安装教程
1.Download xdebug-3.1.6.tgz
2.Install the pre-requisites for compiling PHP extensions.
On your RedHat system, install them with: yum groupinstall "Development tools" && yum install php-devel autoconf automake
3.Unpack the downloaded file with tar -xvzf xdebug-3.1.6.tgz
4.Run: cd xdebug-3.1.6
5.Run: phpize (See the FAQ if you don't have phpize).
6. Run: ./configure
7. Run: make
8. Run: cp modules/xdebug.so /usr/lib64/php/modules
9. Create /etc/php.d/99-xdebug.ini
//and add the line:
zend_extension = xdebug
xdebug.mode = debug xdebug.start_with_request = yes xdebug.client_port = 9000 xdebug.discover_client_host = true xdebug.client_host = 虚拟机ip
10.Restart the Apache Webserver
5.安装Remote-SSH
6.尝试远程连接
更多推荐
已为社区贡献1条内容
所有评论(0)