not one of the ways doesn't work for me. apparently the problem is something else((
First of all, which debugger backend are you using?
And: I am afraid, if you are on Mac, it may be more complicated.
IIRC the "LLDB + FpDebug" does not support watchpoints at all (but I would have to check), and the same for "lldb alpha". Though if they do, then the syntax must be known by LLDB. I am not sure what lldb takes.
If you are on a "non intel" (including non AMD) machine (e.g. risc/arm) then you likely must use gdb. Then the syntax for the expression must be understood by gdb. Though IIRC gdb does understand ^byte. But it may need 0x12345678 instead of $12345678
If you are on Intel/AMD and Windows/Linux, then you should use FpDebug (check that you do). And that should get you the desired result.
Does not work, means? => Open the "breakpoint window", it should list the watchpoint.
- does (when the app runs) the watchpoint have a red bullet? (NOT with a question mark)?
- any other symbol ? (check the "state" column // needs resizing of the column)
Also, check if you have other, old watchpoints in there.
As indicated, only 4 can be used. Even if the other don't work, they may block the new one.
Test that watchpoints (data breakpoints) work in general.
Test in a contained small sample app.
- Put a watchpoint on a global or local variable, then run some code that writes to it.
- Try ^longint(@int_variable)^ and see if that works
- get the address of the int_variable (watch @intvar) and try the ^longint($1234)^
When you use the ^($1234)^ syntax, then try "watch scope" declaration. It should work with global or declaration, bot lets make sure....
Also, enter any expression (that you want to use for a watchpoint) as a normal watch first. It should show the value at the address.
If not, then it will give you an error, and that may help finding the problem.