添加断点
添加断点
- 用以下方法之一添加新的断点:
- 在代码编辑器中,单击左侧空白处或在希望应用程序停止的特定行上选择F9(macOS 上为F8)。
- 在Breakpoint Preset 视图或Breakpoints 视图中:
- 双击视图的空白部分。
- 右键单击视图,在上下文菜单中选择Add Breakpoint 。
- 双击视图的空白部分。
- 在Breakpoint type 中,选择应用程序代码中希望应用程序停止的位置。
清除Enabled ,使断点暂时失效,就像删除了断点一样,但保留断点的相关信息,以便以后再次启用。
要指定的其他选项取决于您选择的位置,如文件名和行号、地址、表达式或函数名。下表总结了高级选项。
选项 | 值 |
---|---|
Condition | 在断点停止前要评估的条件,如果条件评估结果为true 。 |
Ignore count | 应用程序停止前忽略断点的次数。 |
Thread specification | |
Path | 确定设置断点时如何指定路径:
|
Module | 为函数或文件类型断点指定模块(库或可执行文件的基本名称),以加快调试器启动速度(CDB、LLDB)。 |
Commands | 应用程序停止时要执行的命令。每行列出一条命令。GDB 会按照你指定的顺序执行命令。 |
Tracepoint only | 跟踪点可以记录应用程序的信息,而无需添加日志语句或修改代码。您可以为跟踪点设置条件。 |
Message | 在应用程序输出中显示的跟踪点信息。 |
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.