Re: Build 172 and some debug facilities proposals
Status: Alpha
Brought to you by:
cwalther
From: Christian W. <cwa...@gm...> - 2008-01-20 07:48:56
|
Andrea Viarengo wrote: > Is there a method or a trick to set something like a "breakpoint" in > the Lua code to put in pause Pipmak, so I can inspect tables in that > position? Not really. One thing that comes close is the debug.debug() function (and the rest of the debug library, which has been available in Pipmak since r162). But since it works on stdin/stdout, I guess it's useless on Windows (unless you compile Pipmak as a console application). > I think it could be very useful a function like "pipmak.pause(key)" > that stops running until the pressing of the key "key" and show > message > "Press <key> to continue", or better show a little overlayed window > with the button "continue", > so I could examine tables also inside function, or execute some code >> from a breakpoint to another breakpoint, in this manner, > with a very little waste of coding efforts, we could have a minimal, > but useful debugging tool, > waiting a complete debug protocol for connecting to an external > debug tool, > that you have mentioned in the past. The problem with this is that Lua execution and screen redrawing (and everything else except sound) is done synchronously in Pipmak. So, while Lua execution is stopped, the screen is not redrawn, and the table inspector etc. wouldn't work either. Perhaps there would be a way around this if all calls Pipmak makes into Lua were done as coroutines, but that would open a whole another can of worms. This is another reason why I think an external debugger would be an easier solution. -Christian |