VScode远程连接主机

一、前期准备

1、Windows安装VSCode;

2、在VSCode中安装PHP Debug插件;

3、安装好Docker

4、在容器中安装Xdebug

①写一个展现phpinfo的php文件

php 复制代码
<?php
phpinfo();
?>

②在浏览器上打开该文件

③复制所有信息丢到Xdebug: Installation instructions result

④提交之后会给出合适的版本并给出安装教程

php 复制代码
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 天前
FPGA 结构与 CAD 设计(第3章)下
ide·fpga开发
smileNicky1 天前
Lombok @Data 在 IDEA 中运行报错解决方案
java·ide·intellij-idea
好大哥呀1 天前
C++ IDE
开发语言·c++·ide
OpenMiniServer1 天前
AI + GitLab + VSCode:下一代开发工作流的革命性集成
人工智能·vscode·gitlab
滑稽的1 天前
sublime merge汉化
编辑器·sublime text
dust_and_stars1 天前
ubuntu24 安装vscode
ide·vscode·编辑器
向上的车轮1 天前
如何选择Python IDE?
开发语言·ide·python
Destiny_where1 天前
Claude VSCode插件版接入强大的GLM(无需登录注册claude code)
ide·人工智能·vscode·编辑器·claude code
猫头虎1 天前
Claude Code 2026 年1月9日迎来大更新:Agent 能力增强(2.1.0 详解 + 升级指南)
ide·人工智能·macos·langchain·编辑器·aigc·ai编程
__雨夜星辰__1 天前
VScode免密远程连接到Ubuntu(VMware17环境)虚拟机
ide·vscode·ubuntu