I’m writing a slim Ruby Debugger using the set_trace_function.
For each line that are stepped, I can find local variables using the
binding object in the set_trace_func. I only update the variables in
the GUI when the code is stepped or pauesd at a breakpoint, not when
However, when the debuggd scripts exits, I would like to do a final
update of all variables in the GUI. If the script was running free
since the last breakpoint, variable that was updated at last
breakpoint must be updated again in the GUI when the program exits.
Is it possible to reach local variables from the block where the code
exited in the “at_exit” proc ?
Code: Event: GUI
a=1 RUN Not updated
a=2 RUN Not updated
a=3 BREAKPOINT Gui is updated with “a=3”. user press
a=4 RUN Not updated
a=5 RUN Not updated
a=6 EXIT Here I want the GUI to update with
“a=6”. How can i do this?!? :-o