Board index » cppbuilder » How to evalute several values in a breakpoint?

How to evalute several values in a breakpoint?


2005-07-07 10:52:36 AM
cppbuilder5
Hello,
I want to log several values without breaking the execution. In the
"breakpoint properties" window, I fill the expression "iter->CoordinateX,
iter->CoordinateY" in the "Eval expression" combobox (iter is an iterator of
vector). But in the log file, it says "Not a valid expression format type".
If I write "iter->CoordinateX", it works fine.
Can I evalute several values in a breakpoint? If possible, how to write the
expression?
Thanks in advance.
bucher
 
 

Re:How to evalute several values in a breakpoint?

I never found any facilities in the IDE to do that. What I did do when I
needed it is to calculate a variable such that both values are shown.
For example, if I needed X and Y and neither was larger than 1000 then I
might declare a variable outside of any function in the file (so that the
optimizer won't remove it) and do something like var_name = (1000 * y) + x;
Then when I break the expression of the value of var_name shows both of the
values in which I have interest.
. Ed
Quote
bucher wrote in message
news: XXXX@XXXXX.COM ...

I want to log several values without breaking the execution. In
the "breakpoint properties" window, I fill the expression
"iter->CoordinateX, iter->CoordinateY" in the "Eval expression"
combobox (iter is an iterator of vector). But in the log file, it says
"Not a valid expression format type".
If I write "iter->CoordinateX", it works fine.

Can I evalute several values in a breakpoint? If possible, how
to write the expression?
 

Re:How to evalute several values in a breakpoint?

"Ed Mulroy" < XXXX@XXXXX.COM >wrote in message
Quote
I never found any facilities in the IDE to do that. What I did do when I
needed it is to calculate a variable such that both values are shown.

For example, if I needed X and Y and neither was larger than 1000 then I
might declare a variable outside of any function in the file (so that the
optimizer won't remove it) and do something like var_name = (1000 * y) +
x;

Then when I break the expression of the value of var_name shows both of
the
values in which I have interest.
It might be slightly clearer to do something in string form:
AnsiString data = x + ", " + y;
Then add 'data' in the watch window.
- Dennis
 

{smallsort}

Re:How to evalute several values in a breakpoint?

That's better than the way I posted.
As my wife often reminds me, my solutions are not always the simplest or the
most obvious :-(
Quote
Dennis Jones wrote in message
news:42cd4a64$ XXXX@XXXXX.COM ...


It might be slightly clearer to do something in string form:

AnsiString data = x + ", " + y;

Then add 'data' in the watch window.