clion nginx remote debug 简单说明
  8KhYbgszLLmZ 2023年11月30日 101 0

社区有人共享了一个基于clion 通过gdb server 进行nginx 调整远程调试的实践,很不错值得学习下
具体参考https://www.jianshu.com/p/3c2fdb06de9e 但是实际上我们可以直接自己配置基于clion 启动

remote nginx 调整

如下(核心是自己添加了一个debug 的配置)

clion nginx remote debug 简单说明_html

构建makefile 配置

这部分,添加了一个基于remote host 的pre 构建命令(这部分共享也有写)

clion nginx remote debug 简单说明_html_02

nginx 调试配置,这部分属于标准配置

clion nginx remote debug 简单说明_html_03

debug 效果

添加debug

clion nginx remote debug 简单说明_nginx_04

效果(需要请求nginx 服务)

clion nginx remote debug 简单说明_html_05

clion 工具实际上也是启动的gdb server (效果如下)

clion nginx remote debug 简单说明_html_06

说明

对于nginx 远程调试,核心部分还是基于clion 提供的remote ssh 模式,同时配置了远程deployment(代码实际上都是在远程的,同时需要进行同步)对于实际调试部分,需要自己配置一个makefile 的target选择编译的包含debug 的nginx 文件调整nginx 配置文件就可以了,当然如果对于包含
开发的插件效果实际也是类似的只是需要自己调整下nginx 的configure的参数

参考资料

https://www.jetbrains.com/help/clion/remote-projects-support.html#ipv6

https://nginx.org/en/download.html

https://www.jianshu.com/p/3c2fdb06de9e

https://nginx.org/en/docs/dev/development_guide.html

https://nginx.org/en/docs/ngx_core_module.html

【版权声明】本文内容来自摩杜云社区用户原创、第三方投稿、转载,内容版权归原作者所有。本网站的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@moduyun.com

  1. 分享:
最后一次编辑于 2023年11月30日 0

暂无评论

推荐阅读
  NHaurzrhyr04   2023年12月23日   105   0   0 htmljQueryhtmljQuery
  BEOpup9HILHT   2023年12月23日   77   0   0 htmljQueryhtmljQuery
8KhYbgszLLmZ