nanomq clion 远程debug尝试

很简单因为nanomq 是基于cmake 开发的对于clion 来说基于debug 就比较方便了,同时因为nanomq
相关依赖都是通过模块的,还是比较方便的,以下是一个简单的debug 测试

环境准备

基于clion 的remote ssh

  • clone 代码
 
git clone https://github.com/emqx/nanomq.git
cd nanomq
git submodule update --init --recursive
  • 配置工具链

  • 配置deployment

主要配置映射

  • cmake 配置profile

  • 部署代码到remote ssh 中

  • 构建nanomq
    在remote ssh 中就行
 
mkdir build && cd build
cmake -G Ninja ..
ninja
  • 添加debug

需要选择构建的二进制程序

  • 添加断点

rest_api.c

  • 请求测试
curl -i --basic -u admin:public -X GET "http://10.0.8.2:8081/api/v4"

效果

说明

nanomq debug 还是比较方便的,基于debug 可以很好的学习内部处理机制

参考资料

https://github.com/nanomq/nanomq
https://nanomq.io/docs/en/latest/api/v4.html

posted on   荣锋亮  阅读(38)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2021-11-23 oceanbase docker运行试用(一)
2017-11-23 systemtap 安装试用

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示