I've started work on this and have a simple Lua 'shell' going that just lua-executes stuff typed into stdin. This gives you a rather nifty immediate mode and should be very useful for debugging and just messing around.
Could this be applied to the entire Max language to improve the debugger?