Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

一分钟进入线上cms-fe调试 #26

Open
deligent-ant opened this issue Nov 9, 2018 · 0 comments
Open

一分钟进入线上cms-fe调试 #26

deligent-ant opened this issue Nov 9, 2018 · 0 comments

Comments

@deligent-ant
Copy link
Contributor

deligent-ant commented Nov 9, 2018

一分钟进入线上cms-fe调试

当线上出现bug,真的是手忙脚乱啊。所以只能线上调试fe(ps:下文只是口译潘导师操作流程),主要步骤是杀掉线上进程,用node --inspect 启动一个调试的node的进程。然后在本地浏览器进行调试

  1. 进入线上机器
  2. 找到启动脚本
   1 node start

改完后的启动脚本如下:

  1 # fe start
  2 node --inspect=0.0.0.0:8889 node start

0.0.0.0:8889端口其实不固定,不占用就可以。
4.杀点线上正在运行的进程,服务器会按照修改后的bootstrap进行重启,故只要杀掉进程即可

  • 查看当前运行进程的pid
    ps aux | grep node
  • 然后kill
kill -s 9 640190

5.待进程重启完成后,进入浏览器inspect
image
6.本地浏览器配置调试的ip与端口,写入线上docker具体的ip与端口
image
7.进入到调试模式(断点,下一步,blablaba)
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant