Debugging With CodeLite - CodeLite调试简介

debugging-catch-bug CBForge.com站内已经有好几篇关于CodeBlocks调试的文章,今天转载并部分翻译一篇关于CodeLite的文章供大家参考。因为在CodeInsight中不打算支持/等编译、调试相关的功能,所以不打算后续再写关于这部分的代码分析文章了。如果哪位朋友有兴趣的话,可以继续供稿。

这一篇中主要包括了:CodeLite 设置;Attach到进程;Debugger UI和Debugger Shortcut几部分。CodeLite在之上封装了一层,但是它并没有使用的命令行模式,而是使用了MI模式。所以调试的输出可能看起来不像你平时知道的那样。这儿有一篇关于/MI的语法说明的文章可以参考:GDB/MI command syntax

Continue reading Debugging With CodeLite - CodeLite调试简介 - 全文阅读

Code::Blocks Debug Shortcut and Example

作为一个优秀的IDE,Code::Blocks自然也提供Debugger的功能,以下我们介绍如何使用Code::Blocks的Debugger和使用实例。下面是CodeBlocks Debug的快捷键定义():

Debug - F8 ,Continue - Ctrl + F7 ,Step over a code block  - F7

Step into a code block - Shift + F7,Step out of a code block - Ctrl + Shift + F7

Toggle breakpoint - F5Run to cursor - F4

Previous error - Alt + F1Next error - Alt + F2

Continue reading Code::Blocks Debug Shortcut and Example - 全文阅读

Debugging with Code::Blocks

Build debug version of your project

Make sure that the project is compiled with the -g ( symbols) option on, and the -s (strip symbols) option off. This ensures that the executable has debug symbols included.

首先你要确认编译选项 -g是打开的,-s是关闭的(strip会把debug信息清除)

optimization switches should be turned off, stripping symbols (-s) must be turned off.

Keep in mind that you may have to re-build your project as up-to-date object files might not be re-compiled with -g otherwise. Please be aware that in compilers other than GCC, -g and/or -s might be a different switch (-s might not ba available at all).

Menu => Project => Build Options

Set Project Build Options

Continue reading Debugging with Code::Blocks - 全文阅读

Contact us

Admin: Bryan Wu