Debuger and variable changing evolution watching

Hi everybody,
Is there a way to see when a variable is changing instead of using debug.log everywhere please?
For exemple when a player click on a button it will make it red instead of blue since the value changed the console will show the line where buttoncolor was modified ?

Convert the variable into property:

	private Color _color;
	public Color color
	{
		get { return _color; }
		set
		{
			if (_color != value)
			{
				Debug.Log("Color has been changed");
			}

			_color = value;
		}
	}

Thanks for your answer but I don’t understand how this would help in my case since it will never tell me what line of code did change my value of colour, it will just tell me that color is no more equal to value and I still need to use a lot of debug.log to see where it has changed unless I didn’t understand your answer.
Isn’t there a way to do it without code by using the tools provided by Unity?

Actually, it will. Almost every console log entry shows you the full stack trace with method names and line numbers which have led to the corresponding Debug.Log call.

Ok I’ll try it later, it will take time since I have never converted a variable to a property but it should work thank you.