I have a Mathematica notebook that includes some dynamic structures (with Manipulate
). Sometimes, I discover that x
has been assigned the value 0.
, but I don't know where this happened. I certainly never intended to do it. I suspect it is leaking from some dynamic structure.
Once I notice it, it's easy to clear the value, but I would like to figure out where this is coming from so I can fix it. What is the best way to figure out where it got assigned a value?
TracePrint[(* expr *), _Set | _SetDelayed]
? $\endgroup$x
has been cleared, this only returnsx
(with no history). I'll try it out next time it unexpectedly has a value to see if it works then. $\endgroup$x
is assigned to any value. $\endgroup$