2022年8月30日11:08:03
- 这几天在测试webman作为luckysheet的后台,之前是使用vscode remote explorer开发
- Monitor进程都是正常reload改动的代码
-
- 但是因为vscode的代码提示,代码追踪效果不好,都是需要写代码的时候去PhpStorm开发,测试回vscode
-
- 注意:vscode的remote explorer的工作模式是ssh到linux,直接读取linux的代码,直接执行代码
-
-
- PhpStorm远程开发是ftp sftp到linux,下载代码到本地,然后修改完的代码在通过ftp sftp upload到linux上
-
- 这样就会到只一个问题,如果本地windows的时间和linux服务器上不一致就有问题了,因为虚拟机的没有自动ntp
-
- linux的时间是慢于windows的,导致在PhpStorm开发的代码的时间是领先于linux的,改动的代码上传到linux之后
- getMTime的时间就会慢于windows,Monitor进程就会
-
- if ($last_mtime < $file->getMTime() && in_array($file->getExtension(), $this->_extensions, true))
-
- 就无法继续执行下去,posix_kill(posix_getppid(), SIGUSR1);
- 不会发信号给进程重新启动进程
-
- 解决办法:
-
- 每次开发执一次时间同步就没问题了
-
- ntpdate cn.pool.ntp.org 最好放入到计划任务
-
- date -s 手动修改
-
-
- 如果你使用vmware 做linux的虚拟机,可以设置一下
-
- PhpStorm远程开发参考:
- https://blog.csdn.net/guchenglu/article/details/103833414

