Mathematica: HOWTO Find the value of a symbol in all contexts

Webel IT Australia promotes the amazing Mathematica tool and the powerful Wolfram Language and offers professional Mathematica services for computational computing and data analysis. Our Mathematica tips, issue tracking, and wishlist is offered here most constructively to help improve the tool and language and support the Mathematica user community.
DISCLAIMER: Wolfram Research does not officially endorse analysis by Webel IT Australia.
Icon class
icon_class
far fa-sticky-note
icon_class_computed
far fa-sticky-note
Note kind
Policy level
Keywords
There is no pre-defined function for finding which contexts a symbol is defined in, but you can use the following to iterate over all known contexts and find the value of a symbol without creating any new symbols in the contexts tested:

valueInAllContexts[symbol_] := Symbol /@ Names[# <> ToString[symbol] & /@ $ContextPath]; 
Typical result for a var known globally and in two contexts:

{ContextA`var, ContextB`var,var}
Above, the var is known in each context but does not have values. If it has a value valB in, say, one of the contexts ContextB you'd get:

{ContextA`var,valB,var}
Relates to
Related notes
Related notes (backlinks)
Related snippets (extracts)
Visit also
Visit also (backlinks)
External links