Home › Forums › Programming › Lua Debugging in Visual Studio?
- This topic has 11 replies, 7 voices, and was last updated 13 years ago by Anonymous.
-
AuthorPosts
-
-
01/12/2007 at 11:47 pm #6402AnonymousInactive
Hi all,
Working more and more with Lua under C++, and am looking at ways to improve the toolchain.
I’ve got VSLuaLangPack up and running which helps, but I’m really looking for something that allows script debugging, breakpoints, and possibly call stack viewing.
I’ve found VSLua, it is pretty good,
http://www.itrango.com/vslua/but just wondering if anyone out there has come across an open-source app, and/or more featured, etc.
Lua 5.1.2 is the current version, if relevant.
Thanks,
B. -
27/05/2008 at 11:25 am #41230AnonymousInactive
Hi jediboy,
Check out Decoda. http://www.unknownworlds.com/decoda
It’s pretty handy I have to say, and I think it’s probably the way to go.
I used VSLua for a while too, it’s great that it’s integrated into the vs ide.
Of course, you could just write your own debugger with lua’s debug interface ;)
Tim
-
30/07/2009 at 2:44 am #44399AnonymousInactive
Got put on to this a while back and have been pleasantly surprised by it.
Tilde: http://luaforge.net/projects/tilde/
Its free, open-source, and fairly battle-tested.
I’ve only recently been put on to a few other debuggers including:
Zeus: http://www.zeusedit.com/
and
LuaDebugger: http://code.google.com/p/lua-debugger/
My votes is still with Tilde, at least for now.
-B.
-
30/07/2009 at 3:03 am #44400AnonymousInactive
…and I’ve had a few PM’s about Lua and relevant tutorial links, and so I’d recommend the following:
Lua tutorials wiki: http://lua-users.org/wiki/TutorialDirectory
Its the first hit in google, and really for any students out there looking to get their head around what Lua is, its syntax, the virtual machine, and so forth its the best place to start. work through those and your good to go.
After that, its a case of where to use Lua in a game context, and again my recommendation is to check out this:
LuaBind: http://www.nuclex.org/articles/quick-introduction-to-luabind
This will show you how to "bind" your lua scripts to C++ code. There are other "binders" or wrappers out there, but I’ve used this one without any issues so it gets my vote. Note the fact that LuaBind uses Boost, which increases the build time a bit.
Anyway, as for usage, I tend to use Lua for state machine behaviours, so in my C++ code, where the game, a bot, a menu or whatever changes from one state (patrolling) to another (shooting) C++ changes state, but the contents of the Lua script associated with that state gets executed. Essentially, your decoupling your behaviour from your object’s state.
There’s plenty of arguments about whether this is the correct approach or not. Arguments in favour of farming out the "game play behaviour" to essentially a text file are that it is easier to edit, debug (sort of) and tweek by game designers and level editors.
Arguments against would be that hitting the Lua VM is slower than C++ code and therefore a bit of a bottleneck. fair point. IMO its all about balance and pro’s and con’s. No hard and fast rules.
I’ve also heard people propose to have a Lua VM running on a per-core basis, to see if that improves performance. E.g. have a core/SPU (whatever) run your physics, and have a Lua VM up and running on that core running physics-related Lua scripts. I’m pretty sure this is possible, but as for it being optimal or not, I have no idea. I do know that Lua supports threads (Coroutines: http://lua-users.org/wiki/CoroutinesTutorial) and I think its intended to use the VM in that manner.
Anyway, I hope this gets people started and clarifies some of the points I made in PM’s.
Again, Lua’s been ported to just about every platform, so once you know the syntax, you could for example get a "Guess My Number" or "Hangman" game up and running in minutes on the
PSP: http://en.wikipedia.org/wiki/Lua_Player
DS: http://microlua.risike.com/
Wii: http://code.google.com/p/luaplayerwii/and so on.
Right, that should do it for now.
-Brendan.
-
30/07/2009 at 10:14 am #44401AnonymousInactive
It’s interesting to see so many Irish coders using Lua – I had to learn Lua for making those 2 iPhone apps, as that’s the scripting language that Shiva uses ( http://www.stonetrip.com ).
I’m now evaluating Unity 3D to test speed differences / workflow etc relating to iPhone development. Shiva is very powerful, but it’s always worth checking out alternative technologies etc.
Mal
-
30/07/2009 at 2:48 pm #44404AnonymousInactive
I’ve heard that Decoda works well. PC, XBox360 & PS3 only though. We’re using a lot of LUA code for games development on iPhone – it’s a great language.
Anyone know of good tools for debugging LUA on iPhone?
-
30/07/2009 at 8:38 pm #44405AnonymousInactive
Ya we use lua for scripting and our reflection system.
-
31/07/2009 at 6:01 pm #44409AnonymousInactive
Yup Lua here too, mainly for mission scripting. We wrote our own debugger though.
-
31/07/2009 at 6:59 pm #44411AnonymousInactive
Yup Lua here too, mainly for mission scripting. We wrote our own debugger though.[/quote:706c9d3efc]
Makes sense the ones on the web are bs to be honest for commerical products.
-
09/09/2009 at 10:13 am #44572AnonymousInactive
I was on my way to check out the new version of LuaEdit out (2010) here: http://luaforge.net/frs/?group_id=84&release_id=1463
And also the latest version of Decoda, from here: http://www.unknownworlds.com/decoda/consoles/
Just noticed that its the gang at Kore.net who supply the PS3/360 versions of Decoda. Cool.
Any locals involved?
-Brendan.
-
12/04/2011 at 8:59 pm #46935AnonymousInactive
I’ve just written a lua debugger : GRLD.
http://www.cushy-code.com/grldIt has a graphical interface, and can work remotely through a network connection. Source code is available, and it’s free of charge for non-commercial use.
-
16/04/2011 at 7:00 pm #46958AnonymousInactive
cool. look forward to checking it out.
-
-
AuthorPosts
- The forum ‘Programming’ is closed to new topics and replies.