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

相关推荐
学嵌入式的小杨同学7 小时前
从零打造 Linux 终端 MP3 播放器!用 C 语言实现音乐自由
linux·c语言·开发语言·前端·vscode·ci/cd·vim
小魏小魏我们去那里呀9 小时前
Alibaba Cloud DevOps Integration For JetBrains 插件使用指南
ide·阿里云·devops·jetbrains
badfl10 小时前
VSCode Claude Code插件配置教程:使用、配置中转API、常见问题
人工智能·vscode·ai
aidou131416 小时前
Visual Studio Code(VS Code)安装步骤
vscode·npm·node.js·环境变量
学嵌入式的小杨同学18 小时前
【Linux 封神之路】进程进阶实战:fork/vfork/exec 函数族 + 作业实现(含僵尸进程解决方案)
linux·开发语言·vscode·嵌入式硬件·vim·软件工程·ux
Laurence18 小时前
从零到一构建 C++ 项目(IDE / 命令行双轨实现)
前端·c++·ide
我待_JAVA_如初恋20 小时前
安装idea教程
java·ide·intellij-idea
mftang21 小时前
STM32Cube IDE 详细介绍
ide·stm32·嵌入式硬件
綦枫Maple21 小时前
IDEA选择“在当前窗口打开”还是“新窗口打开”的提示不见了,如何恢复?
java·ide·intellij-idea
一路向北North21 小时前
vscode 安装插件非常慢
ide·vscode·编辑器