Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: typicalc on May 16, 2016, 10:17:58 pm
-
The watch -window shows structure pointer hex address values, I'd like to see the structure members also.
For example in my code I have:
void somefunc(struct address *test)
{
..
}
When debugging what goes on in "somefunc" I'd like to see what in test->street and test->name etc. I can enter each watch member but that is cumbersome. Is tehre an easier way?
-
Write click on the watch and there is a menu item in the context menu that replaces the variable with its dereferenced value. It turns test into *test.
You can also manually enter dereferenced variables.
-
The only downside of showing an entire structure in the watch window (and this is minor of course) is that you can't control the displayed format of each member variable.
-
Thanks.
The watch window already had the local item "test", but clicking it procudes no ".." button. However entering "test" as a new watch item and clicking that got what I wanted.
-
The "..." button is not what you want. :)
Enter *test and you'll see a lot better output. :)