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

相关推荐
xtmatao24 分钟前
JAVA开发工具——IntelliJ IDEA
java·ide·intellij-idea
未来之窗软件服务2 小时前
【免费】会员管理系统——-智能编程——仙盟创梦IDE
ide·会员系统·智能编程·仙盟创梦ide
奔跑吧邓邓子2 小时前
解锁Vscode:C/C++环境配置超详细指南
c语言·c++·vscode·配置指南
大道随心4 小时前
【1】跨越技术栈鸿沟:字节跳动开源TRAE AI编程IDE的实战体验
ide·开源·ai编程
zorro_z10 小时前
启程:为何选择PHP?
php
小柯博客10 小时前
从零开始打造 OpenSTLinux 6.6 Yocto 系统(基于STM32CubeMX)(十二)
c语言·stm32·单片机·嵌入式硬件·php·嵌入式
且白17 小时前
vsCode使用本地低版本node启动配置文件
前端·vue.js·vscode·编辑器
维克喇叭17 小时前
vscode 离线安装第三方库跳转库
ide·vscode·编辑器
alpszero19 小时前
在VSCode中使用Ultralytics扩展
vscode·yolo11
冰橙子id20 小时前
centos7编译安装LNMP架构
mysql·nginx·架构·centos·php