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

相关推荐
treesforest9 小时前
网络安全中的IP地址查询:从日志里的一条线索到溯源的关键证据
网络·web安全·php
VIP_CQCRE11 小时前
在 OpenCode IDE 中接入 Ace Data Cloud:让 VS Code、Cursor、Windsurf 都能调用统一 AI Coding 能力
vscode·ai编程·开发工具·opencode·acedatacloud
wjcroom11 小时前
实现老型号HP打印机手机无线打印的一些步骤和方法
开发语言·智能手机·php
sunburn-11 小时前
Java 排序算法详细教学:从冒泡排序到快速排序
java·开发语言·数据结构·ide·算法
Days205011 小时前
时间胶囊项目正式发布
javascript·gpt·php
life码农11 小时前
PhpStorm或Pycharm中 如何从某个位置全选文字到文件末尾
ide·pycharm·phpstorm
DevUp11 小时前
老站往哪搬:织梦、帝国、PHPCMS 的出路
后端·php·cms
神一样的老师12 小时前
RA-Eco-RA4M2-100PIN-V2.0 开发环境:VSCode + FSP 从新建工程到点亮 LED
ide·vscode·编辑器
索端阳13 小时前
I.MX6ULL 裸机开发:LCD Framebuffer 与 RGB888 学习笔记
笔记·vscode·嵌入式硬件·学习
围炉聊科技13 小时前
你从IDE切到ADE了吗?智能体开发环境赛道地图——智能体基建系列
ide·人工智能