phpStudy vscode 搭建debug调试的教程详解

吾爱主题 阅读:127 2021-10-20 13:41:00 评论:0

下载地址

phpstudy:http://www.tuohang.net/soft/259.html
vscode:https://code.visualstudio.com/ 设置
phpstudy版本:7.3.4nts

?
1 2 3 4 5 6 7 8 9 10 11 12 13 [xdebug] zend_extension=d:/phpstudy_pro/extensions/php/php7.3.4nts/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/php7.3.4nts.xdebug.trace xdebug.profiler_enable=on xdebug.profiler_output_dir=d:/phpstudy_pro/extensions/php_log/php7.3.4nts.xdebug.profiler xdebug.remote_enable=on xdebug.remote_autostart=on xdebug.remote_host=localhost xdebug.remote_port=9000 xdebug.remote_handler=dbgp

vscode :
ctrl+,调出setting,或则文件->首选项->设置

php路径设置

?
1 2 3 4 5 6 7 8 9 10 {    "window.zoomlevel" : 1,    "git.confirmsync" : false,    "git.autofetch" : true,    "[javascript]" : {      "editor.defaultformatter" : "vscode.typescript-language-features"    },    //关键点    "php.validate.executablepath" : "d:/phpstudy_pro/extensions/php/php7.3.4nts/php.exe" }

xdebug设置

?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 {    // 使用 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      }    ] }

验证

vscode f5启动调试

浏览器输入:localhost/test.php

到此这篇关于phpstudy vscode 搭建debug调试的教程详解的文章就介绍到这了,更多相关phpstudy vscode 搭建debug调试内容请搜索服务器之家以前的文章或继续浏览下面的相关文章希望大家以后多多支持服务器之家!

原文链接:https://blog.csdn.net/miaochenfly/article/details/107617154

可以去百度分享获取分享代码输入这里。
声明

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

【腾讯云】云服务器产品特惠热卖中
搜索
标签列表
    关注我们

    了解等多精彩内容