Visual Studio 2010 Locals Window Red Font
Asked Answered
P

4

21

One of my Debug.Assert() fails so I get a window with the call stack and I click Retry. At this point, in the Locals window, certain rows have red text instead of black text in the Value column. What does this mean?

Popcorn answered 28/5, 2011 at 15:34 Comment(0)
C
29

That means those variables were updated by the previous operation. That operation might be a line of code executing, or it might be you manually changing the value as detailed in the blog referenced by @CharithJ's answer.

Creaky answered 28/5, 2011 at 15:49 Comment(1)
You will see this same behavior in the locals window and in any pinned data tips, as well.Thai
C
9

Here is an explaination.

In this case, I will change "d" to another value: enter image description here

The changed value will turn red afterward to indicate it has been modified: enter image description here

Choric answered 28/5, 2011 at 15:51 Comment(0)
H
5

A row that has turned red means that the value for that expression has been modified since the last time it was evaluated.

Held answered 28/5, 2011 at 15:50 Comment(0)
D
0

For those wondering what the string is called to edit the colour of the Changed value text, it can be found under Locals Window → Changed value → Foreground.

enter image description here

Doubtless answered 27/4, 2018 at 7:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.