调试 CMake 项目文件

通过Qt Creator 实现的调试适配器协议(DAP),您可以调试 CMake 项目文件。

注意: DAP 需要 CMake 3.27 或更高版本。

调试 CMake 项目文件:

  1. Edit 模式下,在 CMake 文件中设置断点。
  2. 转到Debug >Start Debugging >Start CMake Debugging

    调试模式下的 DAP CMake 预设视图

当应用程序在断点处停止时,您可以在Debug 模式视图中检查数据。

另请参阅 如何:调试调试调试器调试器CMake

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.