Clion远程调试Redis源码

官方 Redis 不支持 Windows 环境下构建运行,如希望在 Windows 环境下跟踪调试 Redis 源码,可使用 CLion 的远程开发模式。 1. 概述 CLion 的远程调试有两种模式: Remote GDB Server:仅支持 cmake 项目,CLion 可自动构建二进制文件并上传到远程服务器,并自动调用 gdbserver 执行程序。 Remote Debug:可支持非 cmake 项目,需手动在远程服务器端完成首次构建,并将可执行文件和符号表下载到本地环境。 由于 Redis 通过 makefile 进行构建,并非 cmake 项目,所以需采用 Remote Debug 模式。 Remote Debug Remote GDB Server Project format Any CMake Toolchain Not specified Default on macOS/Linux; MinGW, Cygwin, WSL on Windows; Remote and Docker toolchains also available Path mappings Not created automatically, should be set up in run/debug configuration Not created automatically,should be set up in run/debug configuration 2. 环境准备 本地系统: Windows(Windows 10) ...

2025-04-19 02:35:41 · 刘涛