Dcmake:一个新的 CMake 调试 UI
Dcmake: A new CMake debugger UI

原始链接: https://nullprogram.com/blog/2026/04/07/

## dcmake:一个新的 CMake 调试器 一个新的 GUI 应用程序 **dcmake** 允许开发者使用 CMake 内置的 `--debugger` 模式(CMake 3.27 引入)交互式地调试 CMake 脚本。该工具在一天内创建完成,跨平台(macOS、Windows、Linux),利用调试器适配器协议 (DAP) 实现诸如步进、断点和变量检查等功能。 快速开发得益于 AI 辅助 UI 开发的进步,作者能够以最小的努力快速构建一个 Dear ImGui 界面。dcmake 模仿 Visual Studio UI,具有熟悉的键盘快捷键和持久会话状态。 它通过在 `CMakeLists.txt` 文件的第一行暂停 CMake 来工作,从而实现逐步执行并深入了解 CMake 的内部机制。不支持调试构建调用,但支持 `-P` 脚本模式。该工具无需 UTF-8 清单即可处理 Windows 上的 Unicode 路径,这需要超出当前 AI 能力的手动干预。dcmake 将包含在下一个 w64devkit 版本中。

对不起。
相关文章

原文

nullprogram.com/blog/2026/04/07/

CMake has a --debugger mode since 3.27 (July 2023), allowing software to manipulate it interactively through the Debugger Adaptor Protocol (DAP), an HTTP-like protocol passing JSON messages. Debugger front-ends can start, stop, step, breakpoint, query variables, etc. a live CMake. When I came across this mode, I immediately conceived a project putting it to use. Thanks to recent leaps in software engineering productivity, I had a working prototype in 30 minutes, and by the end of that same day, a complete, multi-platform, native, GUI application. I named it dcmake (“debugger for CMake”). I’ve tested it on macOS, Windows, and Linux. Despite only being couple days old, it’s one of the coolest things I’ve ever built. Prior to 2026, I estimate it would have taken me a month to get the tool to this point.

It has a Dear ImGui interface, which I’ve experienced as a user but never built on myself before. Specifically the docking branch. In a sense it’s a toolkit for building debuggers, so it’s playing an enormous role in how quickly I put this project together. All of the “windows” tear out and may be free-floating or docked wherever you like, closely matching the classic Visual Studio UI. I borrowed all the same keybindings: F10 to step over, F11 to step in, F5 to start/continue, shift+F5 to stop. Click on line numbers to toggle breakpoints, right click to run-to-line, hover over variables with the mouse to see their values. Nearly every every UI state persists across sessions, and it opens nearly instantly.

联系我们 contact @ memedata.com