I skimmed a bit because this sounds just like how Eclipse debugger will jump back to the start of a function if you change the code in it, mixed with the Display tab that lets you write code using all the variables in the current scope. I don't use it while writing my own code, but it's invaluable for figuring out surprises in other people's.