Hardware Breakpoints

General questions regarding the usage of CodeLite
User avatar
caibbor
CodeLite Veteran
Posts: 78
Joined: Thu Jan 10, 2013 10:37 pm
Genuine User: Yes
IDE Question: c++
Contact:

Hardware Breakpoints

Post by caibbor »

I haven't found a way to add a hardware breakpoint (ie, the program will break whenever a particular variable is changed, etc). It's a GDB feature and I used it quite a bit in CodeBlocks.

If CodeLite has this functinoality, where is it?

P.S., Sorry for all the comparisons to CodeBlocks ;)



Edit: In this screenshot, I'm not sure if there's supposed to be something in this menu, but there never seems to be...
You do not have the required permissions to view the files attached to this post.
User avatar
Jarod42
CodeLite Expert
Posts: 240
Joined: Wed Sep 30, 2009 5:54 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Re: Hardware Breakpoints

Post by Jarod42 »

In the Debug Pane, you may add breakpoint with the 'Add' Button.
And there, you may choose between breakpoint and watchpoint.
you are looking for watchpoint.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Hardware Breakpoints

Post by eranif »

caibbor wrote:If CodeLite has this functinoality, where is it?
Debugger pane -> Breakpoints tab
caibbor wrote:Edit: In this screenshot, I'm not sure if there's supposed to be something in this menu, but there never seems to be...
By default this list is empty.
You add items to it by defining some kind of "complex" expressions to watch, for example, you can choose to display a vector like this:

Code: Select all

$(variable).size()
Or, instead of std::string, you can choose to display it like this:

Code: Select all

$(variable).c_str()
These are called 'Pre Defined Types' in codelite, you can read more about this here:
http://codelite.org/LiteEditor/DebuggerSettings

Eran
Make sure you have read the HOW TO POST thread
User avatar
caibbor
CodeLite Veteran
Posts: 78
Joined: Thu Jan 10, 2013 10:37 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: Hardware Breakpoints

Post by caibbor »

Thank you both.

I expected to find this in the Watches window, turns out it's a feature of the Breakpoints window. Makes sense! (:

I expected that I should be able to click on an expression in the editor and have "Add Watchpoint" be in the context menu somewhere.
Post Reply