This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
blockly's profile picture

Debug Output For Lua Programs Running On Turtles?

Started by blockly, 21 October 2013 - 06:18 PM
blockly #1
Posted 21 October 2013 - 08:18 PM
I'm testing a turtle program I wrote, printing debugging messages. This works fine when my turtle returns, but sometimes my turtle doesn't come back from its explorations. Is there any way I can have messages written to some sort of debug console that I can see even if I can't interact with the turtle? I'm using OpenPeripheral, and my turtle has a pickaxe and sensor attached, so I can't attach anything else to it.

Thanks.
theoriginalbit #2
Posted 21 October 2013 - 08:28 PM
Definitely, have it print to a file on the Turtle itself, then inspect the output file in the Turtle's folder (on your local file system).
An example of a Logging API I have made can be found here. Obviously this is far more than you need, it's just an example of writing to files, without much else to get in the way.
blockly #3
Posted 21 October 2013 - 09:07 PM
Thanks so much!