如何网站推广策划,网站备案号位置,十堰网站推广,wordpress xml生成免插件安装ssh
在vscode扩展插件搜索remote-ssh安装 如果连接失败#xff0c;出现 Resolver error: Error: XHR failedscode 报错#xff0c;可以看这篇帖子vscode ssh: Resolver error: Error: XHR failedscode错误_阿伟跑呀的博客-CSDN博客
添加好后点击左上角的加号#xff0…安装ssh
在vscode扩展插件搜索remote-ssh安装 如果连接失败出现 Resolver error: Error: XHR failedscode 报错可以看这篇帖子vscode ssh: Resolver error: Error: XHR failedscode错误_阿伟跑呀的博客-CSDN博客
添加好后点击左上角的加号ssh root目标主机ip点击linux输入密码即可 安装xdebug环境
在vscode中安装扩展插件PHP Debug。也需要在目标主机上安装PHP Debug 在linux中安装php并将phpinfo的内容php -r phpinfo();粘贴到这个网站里https://link.zhihu.com/?targethttps%3A//xdebug.org/wizard。
注php版本不能过低之前使用的5.6版本提示不能使用后改为7.3可以正常识别。具体修改可以自行百度 接着下载Download xdebug-3.1.6.tgz
将下载的文件上传并解压tar -xvzf xdebug-3.1.6.tgz
切换到解压目录cd xdebug-3.1.6
运行phpize
如果没有phpize则需要安装 yum install php-devel。此处可能会有报错报错的原因可能是php版本和下载的php-devel版本不一致。需要去官网找到对应的php版本下载对应的php-devel工具php-devel官网RPM resource php-devel。下载好了后将rpm包上传运行rpm -ivh xxxxxx.rpm 如果提示缺少依赖则一个个yum install 缺少的依赖即可。
接下来执行./configure
编译 make
运行cp modules/xdebug.so /usr/lib64/php/modules
创建文件touch /etc/php.d/99-xdebug.ini
将代码写入echo zend_extension xdebug /etc/php.d/99-xdebug.ini
在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 //xdebug2.0默认9000,3.0默认9003},{name: Listen for Xdebug,type: php,request: launch,port: 9004}
配置xdebug
进入vim /etc/php.d/99-xdebug.ini
写入以下内容 zend_extensionxdebug.so[XDebug]xdebug.remote_enable onxdebug.start_with_request 1xdebug.modetracexdebug.collect_includes 1xdebug.collect_params 1xdebug.modedebugxdebug.client_host127.0.0.1xdebug.client_port9003 //端口修改为上面改的端口xdebug.start_with_requestyesxdebug.remote_log/var/log/xdebug.log
进入下载PHP时自带的php.ini将上面的内容同样添加进去接着重启httpd和php服务即可