zoukankan      html  css  js  c++  java
  • vs code配置PHP开发调试环境

    PHP 5.4.45  mysql 

    1 下载phpStudy集成开发环境

    https://www.xp.cn/download.html

    2 安装继承开发环境

    3 安装vs code 插件 PHP Debug /  PHP Intelephense

     4 启用Xdebug扩展,PHPStudy自带了Xdebug扩展

     5 调试环境配置

    vs code 调试环境配置内容

    {
        // 使用 IntelliSense 了解相关属性。 
        // 悬停以查看现有属性的描述。
        // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
        "version": "0.2.0",
        "configurations": [
            {
                "name": "Listen for Xdebug",
                "type": "php",
                "request": "launch",
                "port": 9003  //端口和php配置一致
            },
            {
                "name": "Launch currently open script",
                "type": "php",
                "request": "launch",
                "program": "${file}",
                "cwd": "${fileDirname}",
                "port": 0,
                "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:0"
                ],
                "program": "",
                "cwd": "${workspaceRoot}",
                "port": 9003,
                "serverReadyAction": {
                    "pattern": "Development Server \\(http://localhost:([0-9]+)\\) started",
                    "uriFormat": "http://localhost:%s",
                    "action": "openExternally"
                }
            }
        ]
    }

  • 相关阅读:
    团队博客——1
    团队博客3
    团队博客6
    团队博客2
    团队博客8
    团队博客4
    团队博客7
    安装“消息队列 (MSMQ)”
    服务端上传文件到共享目录
    数据库变成可疑状态
  • 原文地址:https://www.cnblogs.com/CelonY/p/15635350.html
Copyright © 2011-2022 走看看