How does the built-in debugger decide which definition to highlight in the notebook when Break on messages" is enabled?
Here's an example to illustrate what I mean. First, enable the debugger (Evaluation -> Debugger), then define a function that issues a message:
f::boo:="Boo!!!";
f[]:=Module[{a,b,c,d},
a=1;
b=a;
Message[f::boo];
c=b;
d=c;
a+b+c+d
]
When running f[]
, evaluation will pause on the message and the point where the break occurred will be highlighted:
Now let's re-assign its own DownValues to f
, and re-run it. Now this second definition will be highlighted, but not the original one.
The question: How does the debugger know what to highlight and can we influence this somehow? I would like the definition printed by this spelunking toolthis spelunking tool to be highlighted, if possible.