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

相关推荐
ygqygq24 小时前
让 AI 编程助手更智能:Turbo AI Rules 扩展使用指南
vscode·ai·扩展·rules
AI+程序员在路上4 小时前
网桥及IP转发在嵌入式linux eth0与wlan0连接使用方法
linux·tcp/ip·php
爱吃泡芙的小白白5 小时前
如何在现有配置好环境的Pycharm中安装jupyterlab这个工具
ide·python·pycharm·notebook·虚拟环境·jupyterlab
Michael_lcf8 小时前
WebStorm配置与插件
ide·webstorm
微爱帮监所写信寄信9 小时前
微爱帮监狱寄信写信系统后台PHP框架优化实战手册
android·开发语言·人工智能·网络协议·微信·https·php
白帽子黑客罗哥9 小时前
网络安全防护技术与实战策略:从基础防御到前沿应对
安全·web安全·php
快点好好学习吧10 小时前
PHP程序员到底为什么要学习正则表达式?使用场景是什么?底层原理是什么?
学习·正则表达式·php
Lv117700810 小时前
初识Visual Studio中的 WinForm
开发语言·ide·笔记·c#·visual studio
Qhumaing11 小时前
解决因为jupyter notebook修改路径下没有c.NotebookApp.notebook_dir而无法修改目录问题
ide·python·jupyter
Smartdaili China11 小时前
如何在桌面和移动设备上修复YouTube错误400
开发语言·php·error·youtube·移动·住宅ip·错误400