龙口网站开发,如何向百度提交自己的网站,建设网站的风险分析,打开网页链接远程调试环境配置 前期准备ssh连接 前期准备
安装vscode中的两个扩展包php-debug和remote-ssh 然后安装与PHP版本对应的xdebug 访问xdebug的官方网页#xff0c;复制自己的phpinfo源码到方框中#xff0c;再点击Analyse
ssh连接 输入#xff0c;你想要远程连接的主机i… 远程调试环境配置 前期准备ssh连接 前期准备
安装vscode中的两个扩展包php-debug和remote-ssh 然后安装与PHP版本对应的xdebug 访问xdebug的官方网页复制自己的phpinfo源码到方框中再点击Analyse
ssh连接 输入你想要远程连接的主机ip地址又或者是一个在本地hosts文件中写的DNS映射域名
连接成功后打开项目文件夹
再去安装一次xdebug扩展 安装好后点击运行与调试创建launch.json文件创建后会有内容注释掉括号里面的内容
添加如下内容端口号可以自行修改
version: 0.2.0,configurations: [{name: Debug current script in console,type: php,request: launch,program: ${file},cwd: ${fileDirname},externalConsole: false,port: 9004},{name: Listen for Xdebug,type: php,request: launch,port: 9004}
进入相应目录
写入如下的配置 zend_extensionxdebug.so [XDebug] xdebug.remote_enable on xdebug.start_with_request 1 xdebug.modetrace xdebug.collect_includes 1 xdebug.collect_params 1 xdebug.modedebug xdebug.client_host127.0.0.1 xdebug.client_port9004 xdebug.start_with_requestyes xdebug.remote_log/var/log/xdebug.log 进入下载PHP时自带的php.ini,在最后面加上以上的内容
然后重启php-fpm服务和web服务
然后就可以写一份php文件在本地浏览器上访问打开断点调试即可。