当前位置:网站首页>vscode通过remotessh结合xdebug远程调试php解决方案
vscode通过remotessh结合xdebug远程调试php解决方案
2022-07-29 05:30:00 【su27_0101】
安装 remotessh
配置远程服务器连接秘钥进行登录
Host ubuntu
HostName 192.168.0.1
User root
Port 22
IdentityFile "C:\Users\xxx"
安装 phpdebug
在当前调试项目根目录建立
.vscode/launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9003, // 必须与远程服务器php.ini xdebug.remote_port=9003 设置一致
},
]
}
远程服务器安装xdebug php 拓展
官方导引 https://xdebug.org/docs/install
如:
Ubuntu (18.04 LTS/Bionic, 20.04 LTS/Focal):
sudo apt-get install php-xdebug
修改php.ini配置激活xdebug远程调试
zend_extension = xdebug.so位置
[xdebug]
xdebug.remote_port=9003 // 与本地vscode .vscode/launch.json port保持一致
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.mode=debug
xdebug.start_with_request=yes
xdebug.discover_client_host=On
max_execution_time = 3600

边栏推荐
- etcd原理
- 比较单片机3种时钟电路方案
- VMware虚拟机在物理机win10系统下如何连接外网
- 矩阵分解与梯度下降
- Ansible(自动化软件)
- STP spanning tree principle and example of election rules
- NeuralCF-神经协同过滤网络
- 【冷冻电镜】Relion4.0——subtomogram教程
- After the EtherCAT master station is disconnected, how to ensure that the target system is not affected by the fault?
- 20个hacker神器
猜你喜欢

C语言数据类型

CNN-卷积神经网络

JVM之垃圾回收机制(GC)

Relationship between subnet number, host number and subnet mask

【论文阅读 | cryoET】Gum-Net:快速准确的3D Subtomo图像对齐和平均的无监督几何匹配

Ansible(自动化软件)

Hongke education you want to enter the field of TSN? Hongke teaches you how to build TSN test system

centos 部署postgresql 13

JMM memory model concept

Shallow reading of reentrantlock source code of abstractqueuedsynchronizer (AQS)
随机推荐
MySQL:当你CRUD时BufferPool中发生了什么?十张图就能说清楚
Let the computer run only one program setting
NeuralCF-神经协同过滤网络
CDM—码分复用(简单易懂)
Computer right mouse click always turn around what's going on
The core of openresty and cosocket
AbstractQueuedSynchronizer(AQS)之 ReentrantLock 源码浅读
5g service interface and reference point
吴恩达老师机器学习课程笔记 05 Octave教程
【技能积累】presentation实用技巧积累,常用句式
CNAME记录和A记录的区别
【备忘】关于ssh为什么会失败的原因总结?下次记得来找。
JMM memory model concept
吴恩达老师机器学习课程笔记 02 单变量线性回归
数据库持久化+JDBC数据库连接
王树尧老师运筹学课程笔记 10 线性规划与单纯形法(关于检测数与退化的讨论)
Hongke share | bring you a comprehensive understanding of "can bus error" (II) -- can error types
【冷冻电镜入门】加州理工公开课课程笔记 Part 3: Image Formation
ss命令详解
Software definition boundary SDP