Jump to content
  • entries
    945
  • comments
    5,899
  • views
    930,074

Lua Debugging


Josh

3,521 views

 Share

Until now, we haven't really had proper debugging info when a crash occurs during execution of a Lua script. Thanks to some previous work TylerH did with Lua, a conversation with him revealed how to easily add debugging info into the editor and script interpreter. (Incidentally, the Lua integration was Tyler's idea to begin with!) Here's a shot of the Script Editor catching an engine crash and displaying the script line the error occurs at. This is a crash that occurred in the engine, not a Lua compile error.

blogentry-1-12712911879976_thumb.jpg

This will make Lua a more viable alternative to other programming languages, and it will make it easier to use Lua as an extra enhancement to a C++ or other program. The integration of LuaJIT with the engine also speeds script execution up, a lot. Performance tests of the LuaJIT beta 2.0.0 reveal it to be up to 102 times faster than standard interpreted Lua. (Lumooja first told me this, and I thought he was exaggerating, but you can see for yourself.) And regular Lua was already faster than UnrealScript!

 

In the future, I think we can look forward to having a nice display showing all the variables in your script program in real-time, and improved debugging tools.

 Share

8 Comments


Recommended Comments

That's a useful improvement. Thanks Lumooja and TylerH too. Also good to know that Lua will continue to be fully supported as I've spent a lot of time figuring out the basics of using it.

Link to comment

I'd prefer to stick with plain Lua for now until we are certain everything is stable. But yeah, we'll add it eventually, with an option to toggle the compiled code on and off.

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...