Skip to main content
gamedev.net
🔒 Locked

How to debug LUA

Started by MysticC 0 replies 2.2k views
Original Post
MysticC
MysticC
Hi,there.I am using LUA as scrpit.But I found it is very hard to debug LUA.Would you give me some advice please? Thank you!
sybixsus
sybixsus
It's kind of hard to say, being that you don't provide any details of the kind of problems you're trying to debug. I assume you're logging any and all errors, because Lua does a pretty good job in that department. That pretty much takes care of compile-time debugging. As for run-time debugging, it depends entirely on the language and environment you're using, but the most obvious thing to do is bind a bunch of functions which use your language's/environment's inbuilt debugging tools and then you can use them from Lua. So have a function which logs to the debug console, and bind that to Lua. Have a function which breaks program execution with the debugger, and bind that to Lua.

To suggest anything else, I'd have to know what kind of issues/problems you're trying to debug.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.