新农村建设在哪个网站查,去过外包就永远只能去外包了,公司网站中新闻中心怎样做优化,网站开发前后端分离是主流吗目录 准备工作ssh的连接以及配置调试 准备工作
1.首先你需要下载一个vscode 2.下载模块 你需要在VScode中去下载我们所需的两个模块PHP Debug以及remote -ssh 3.安装对应版本的xdebug 需要在xdebug的官方去进行分析#xff0c;选择适合你自己版本的xdebug
去往官方#x… 目录 准备工作ssh的连接以及配置调试 准备工作
1.首先你需要下载一个vscode 2.下载模块 你需要在VScode中去下载我们所需的两个模块PHP Debug以及remote -ssh 3.安装对应版本的xdebug 需要在xdebug的官方去进行分析选择适合你自己版本的xdebug
去往官方将你自己的phpinfo的源码复制到它相应的位置让它进行分析出一个最适合你自己的xdebug。 https://xdebug.org/wizard 根据它官方的步骤进行安装。
ssh的连接以及配置
1.SSH的连接 安装好上述的模块后打开vscode点击左下角的按钮然后选择Connect to Host。 ssh连接自己想要连接的ip地址。
连接成功后打开你的项目文件夹
同样去安装一次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}2.xdebug配置 我们进入/etc/php/8.1/fpm/conf.d/20-xdebug.ini这个目录下进行修改。
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-fpm和web服务。
systemctl restart php-fpm
systemctl restart httpd调试
这些操作完成后你就可以进行调试了。 打上断点进行调试。