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

相关推荐
迹象Kimizhou_blog19 分钟前
国内 IntelliJ IDEA 集成Claude code,调用deepSeek模型实现agent
java·ide·intellij-idea·deepseek·claude code
Ether IC Verifier30 分钟前
TCP 重传机制详解
服务器·网络·网络协议·tcp/ip·php
bestlanzi1 小时前
vscode 常用的配置内容
ide·vscode·编辑器
乐活青年1 小时前
新版Android Studio不显示gradle task list 问题
android·ide·android studio
公孙秋3 小时前
IDEA MyBatisCodeHelper Pro插件高版本解密
java·ide·intellij-idea
jinglong.zha3 小时前
别再只用命令行!Claude Code接入VSCode和PyCharm,这些技巧让你爽到飞起!
ide·vscode·pycharm·claude code
AI@独行侠3 小时前
【超详细】IDEA 2025版-常用设置配置-一篇文章带您解决idea 2025版本常用配置
java·ide·intellij-idea
码农小旋风7 小时前
IDEA 不只接 Claude 和 Codex:本地模型和第三方 API 也能直接用
java·ide·人工智能·chatgpt·intellij-idea·claude
徐先生 @_@|||7 小时前
pycharm/IDEA + markdown + 图床(PicList)
ide·python·pycharm·intellij-idea
janeysj7 小时前
Jupyter和LangSmith——AI Agent开发调试监控工具
ide·人工智能·jupyter