远程调试环境配置

利用vscode的插件把远程连接调试php转化为本地调试php,通讯从php xdebug通讯变成vscode通讯

1.在vscode中安装插件

2.安装对应PHP版本的xdebug

xdebug版本兼容参考https://xdebug.org/docs/compat#versions

xdebug安装教程1https://blog.csdn.net/song634/article/details/80170838

xdebug安装教程2https://www.cnblogs.com/wicub/p/6226996.html

3.重启httpd

复制代码
service httpd restart

4.建一个launch.json

复制代码
"version": "0.2.0",
    "configurations": [
        {
            "name": "Debug current script in console",
            "type": "php",
            "request": "launch",
            "program": "${file}",
            "cwd": "${fileDirname}",
            "externalConsole": false,
            "port": 9003
        },
        {
            "name": "Listen for Xdebug",
            "type": "php",
            "request": "launch",
            "port": 9003
        }

5.修改php.ini

查看端口

6.调试 xdebug

相关推荐
叶落阁主8 小时前
Tailscale 完全指南:从入门到私有 DERP 部署
运维·安全·远程工作
用户962377954482 天前
DVWA 靶场实验报告 (High Level)
安全
数据智能老司机2 天前
用于进攻性网络安全的智能体 AI——在 n8n 中构建你的第一个 AI 工作流
人工智能·安全·agent
数据智能老司机2 天前
用于进攻性网络安全的智能体 AI——智能体 AI 入门
人工智能·安全·agent
用户962377954482 天前
DVWA 靶场实验报告 (Medium Level)
安全
red1giant_star2 天前
S2-067 漏洞复现:Struts2 S2-067 文件上传路径穿越漏洞
安全
用户962377954483 天前
DVWA Weak Session IDs High 的 Cookie dvwaSession 为什么刷新不出来?
安全
cipher4 天前
ERC-4626 通胀攻击:DeFi 金库的"捐款陷阱"
前端·后端·安全
一次旅行7 天前
网络安全总结
安全·web安全
red1giant_star7 天前
手把手教你用Vulhub复现ecshop collection_list-sqli漏洞(附完整POC)
安全