We can create a real-time monitor for a variable like this:
CreatePalette@Panel@Row[{"x = ", Dynamic[x]}]
(This is more interesting and useful if x
happens to be something like $Assumptions
. It's so easy to set a value and then forget about it.)
Unfortunately this stops working if the kernel is re-launched (Quit[]
, then evaluate something). The palette won't show changes in the value of x
any more.
Is there a way to do this so it keeps working even across kernel sessions? I find myself restarting the kernel quite often. (If the resulting palette causes the kernel to be automatically started after Quit
that's fine.)
Update: As mentioned in the comments, it turns out that the palette ceases working only if we quit by evaluating Quit[]
. When using Evaluation -> Quit Kernel -> Local
, it will keep working.