调试 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.