Vscode整合PHP Server 和debug

VsCode 配置PHP Debug 调试代码_vscode php7.4.3 debug-CSDN博客

按着上面的配置差不多

重要的是php.ini

Xdebug

xdebug.remote_autostart =On

zend_extension=D:/phpstudy_pro/Extensions/php/php5.6.9nts/ext/php_xdebug.dll

xdebug.collect_params=1

xdebug.collect_return=1

xdebug.auto_trace=On

xdebug.trace_output_dir=D:/phpstudy_pro/Extensions/php_log/php5.6.9nts.xdebug.trace

xdebug.profiler_enable=On

xdebug.profiler_output_dir=D:/phpstudy_pro/Extensions/php_log/php5.6.9nts.xdebug.profiler

xdebug.remote_enable=On

xdebug.remote_host=localhost

xdebug.remote_port=9000

xdebug.remote_handler=dbgp

然后vscode运行和调试的配置文件

{

// 使用 IntelliSense 了解相关属性。

// 悬停以查看现有属性的描述。

// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387

"version": "0.2.0",

"configurations": [

{

"name": "Listen for Xdebug",

"type": "php",

"request": "launch",

"port": 9000

},

{

"name": "Launch currently open script",

"type": "php",

"request": "launch",

"program": "${file}",

"cwd": "${fileDirname}",

"port": 9000,

"runtimeArgs": [

"-dxdebug.start_with_request=yes"

],

"env": {

"XDEBUG_MODE": "debug,develop",

"XDEBUG_CONFIG": "client_port=${port}"

}

},

{

"name": "Launch Built-in web server",

"type": "php",

"request": "launch",

"runtimeArgs": [

"-dxdebug.mode=debug",

"-dxdebug.start_with_request=yes",

"-S",

"localhost:3000"

],

"program": "",

"cwd": "${workspaceRoot}",

"port": 9000,

"serverReadyAction": {

"pattern": "Development Server \\(http://localhost:(0-9+)\\) started",

"uriFormat": "http://localhost:%s",

"action": "openExternally"

}

}

]

}

先启动调试中的debug

然后在右键PHP Server :Server Project

相关推荐
讓丄帝愛伱8 小时前
Zed Markdown 预览不能铺满全屏的原因及解决
ide
FungLeo8 小时前
FengCMS· PHP+MySQL升级实录 · 后台参数统一治理:id[]数组、id=undefined 跳转与312组回调组合
android·mysql·php·工程实践·fengcms
FungLeo15 小时前
FengCMS ·PHP+MySQL 升级实录· 设置发布与模板缓存:数据库与配置文件如何避免旧表单覆盖
数据库·mysql·php·工程实践·fengcms
FungLeo16 小时前
FengCMS · PHP+MySQL 升级实录· 编译缓存并发:锁定产物执行、避免重复发布与三类缓存清理
mysql·缓存·php·并发·fengcms
BingoGo18 小时前
为什么 PHP 应该只保留 ZTS 构建模式
后端·php
FungLeo18 小时前
FengCMS · PHP+MySQL 升级实录 · 编辑器迁移:KindEditor → wangEditor5 +服务端 HTML Purifier
mysql·编辑器·php·富文本编辑器·fengcms
FungLeo18 小时前
FengCMS· PHP+MySQL 升级实录 ·模板编译器原理:{$var} 怎么编译成 PHP、缓存怎么失效
mysql·缓存·php·模板引擎·fengcms
BD_Marathon19 小时前
Jupyter魔法命令
ide·python·jupyter
我叫黑大帅1 天前
换尺寸、转个角度就认不出同一张图?让 16×16 灰度网格做感知去重
后端·面试·php
狗凯之家源码网1 天前
家政上门预约服务小程序源码效果展示
php