Debug.Log Extensions
Documentation (1.1.9)

◆ Log() [11/21]

static void Debug.Log ( [NotNull] Expression< Func< object >>  classMember,
[CanBeNull] Object  context = null 
)
static

Logs to the Console the name and value of classMember a class member.

public void SetActivePage(Page value) { activePage = value;

Debug.Log(()=>activePage, this); }

Parameters
classMemberExpression pointing to a class member whose name and value will be logged.
contextObject to which the message applies.

If you pass a context argument that Object will be momentarily highlighted in the Hierarchy window when you click the log message in the Console.