Author Topic: Debug Watch Formula?  (Read 702 times)

Offline rogeriodec

  • Multiple posting newcomer
  • *
  • Posts: 50
Debug Watch Formula?
« 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.
Windows 8.1

SVN 11400

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11939
    • Travis build status
Re: Debug Watch Formula?
« Reply #1 on: March 21, 2018, 12:41:24 am »
Yes, you can do it.
Right click -> Rename and type your expression. A short cut for this is pressing the Insert key.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline rogeriodec

  • Multiple posting newcomer
  • *
  • Posts: 50
Re: Debug Watch Formula?
« Reply #2 on: March 21, 2018, 01:01:37 am »
This option is greyed out. Why?
Windows 8.1

SVN 11400

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11939
    • Travis build status
Re: Debug Watch Formula?
« Reply #3 on: March 21, 2018, 09:47:26 am »
Locals and function arguments cannot be renamed.
You have to add the watch manually below them.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline rogeriodec

  • Multiple posting newcomer
  • *
  • Posts: 50
Re: Debug Watch Formula?
« Reply #4 on: March 21, 2018, 02:08:08 pm »
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.
Windows 8.1

SVN 11400

Offline Quiss

  • Multiple posting newcomer
  • *
  • Posts: 74
Re: Debug Watch Formula?
« Reply #5 on: March 21, 2018, 02:38:49 pm »
Right click the variable in the code, then select "watch 'variable'".

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11939
    • Travis build status
Re: Debug Watch Formula?
« Reply #6 on: March 21, 2018, 04:00:29 pm »
There is also one empty row at the bottom were you can start typing your expression.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline rogeriodec

  • Multiple posting newcomer
  • *
  • Posts: 50
Re: Debug Watch Formula?
« Reply #7 on: March 21, 2018, 04:47:32 pm »
Now I got it!
Thank you very much.
Windows 8.1

SVN 11400