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.尝试远程连接

相关推荐
大衛說4 小时前
02 · 环境搭建:uv 包管理与现代 IDE
ide·uv
山峰哥8 小时前
数据库工程与查询优化案例深度复盘‌
数据库·sql·oracle·编辑器·深度优先·宽度优先
cndes9 小时前
安装Miniconda+Jupyter notebook
ide·python·jupyter
码上暴富13 小时前
Cursor / VS Code 自定义文件颜色
前端·vscode
洛兮银儿15 小时前
pycharm选中同一个词的标记颜色的修改
ide·python·pycharm
2601_9623815815 小时前
VSCode如何配置LlamaIndex RAG(检索增强生成)应用开发环境
vscode·开发环境·rag·llamaindex·检索增强生成
javgo.cn16 小时前
Markweave:开源 Markdown-first WYSIWYG 编辑器
开源·编辑器
北漂燕郊杨哥17 小时前
VS Code 安装微信小程序 MCP 介绍
vscode·微信小程序·小程序·mcp
Sherotree1 天前
Google Antigravity——Agent 被提到主界面
前端·ide·后端·edge浏览器
YZJenny1 天前
在服务器上安装使用code-server(Web 版 VS Code)
ide·vscode·编辑器