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

相关推荐
计算机学姐2 小时前
基于协同过滤算法+PHP的新闻推荐系统
开发语言·vue.js·vscode·mysql·php·phpstorm
爱串门的小马驹5 小时前
VScode配置连接远程服务器
运维·服务器·vscode·远程登录
攀小黑5 小时前
IDEA 24.1 could not autowire. No beans of ‘***‘ type found. 取消 某个类型的 警告
java·ide·intellij-idea
aroc_lo6 小时前
DELPHI编译软件时带上当前IDE的版本号
ide·delphi
睡不醒的小泽11 小时前
VSCode环境下连接 MySQL 8.0 数据库 (C++)
数据库·windows·vscode
Pakho love13 小时前
Linux:软件包管理器 yum和编辑器-vim使用
linux·编辑器·vim
DogDaoDao16 小时前
Windows 环境下 vscode 配置 C/C++ 环境
c语言·c++·windows·vscode·gcc·mingw-w64
多则惑少则明18 小时前
idea 编辑器常用插件集合
java·编辑器·intellij-idea
charon87781 天前
Unreal Engine 5 C++: 编辑器工具编写入门(中文解释)
c++·ue5·编辑器·游戏引擎·虚幻
技术杠精1 天前
mac安装JetBtains全家桶新版本时报错:Cannot start the IDE
ide