Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: rogeriodec on March 21, 2018, 12:16:14 am
-
In debug, while watching variables, is it possible to create an auxiliary formula (out of code)?
Example: my variable "a" has an angle in radians, but I would also like to see the same angle in degrees, so I would create a formula (a * 180 / 3.1415927) to see the contents of the variable also in degrees.
But as I said, this formula would not be in the code, but only in the debug.
-
Yes, you can do it.
Right click -> Rename and type your expression. A short cut for this is pressing the Insert key.
-
This option is greyed out. Why?
-
Locals and function arguments cannot be renamed.
You have to add the watch manually below them.
-
Thanks, but I'm not finding how to do this.
Right click where? In the "Whatches" window I can not get anything. The Insert key also does not change anything.
-
Right click the variable in the code, then select "watch 'variable'".
-
There is also one empty row at the bottom were you can start typing your expression.
-
Now I got it!
Thank you very much.