News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
debugger for MurgaLua?
Author Message
znarf
Junior Member
**


Posts: 34
Group: Registered
Joined: Jun 2007
Status: Offline
Reputation: 0
Post: #1
debugger for MurgaLua?

I've been playing around with SciteDebug lately and I'm quite happy with it, because it just extends my favorite text editor under Windows and Linux with debugging features for my favorite language Lua. Together they make a very fine lightweight IDE which perfectly fits to MurgaLua, apart from one little point: for some unknown reason the inegrated cli debugger does not work together with MurgaLua, I was only able debugging using a vanilla Lua 5.1.x .

So I would like to ask the other MurgaLua users, do you use a debugger? Which one can you recommend? Are there any plans to integrate something like cli debugger into MurgaLua?

Thanks and regards,
Gerald

02-15-2008 05:48 AM
Find all posts by this user Quote this message in a reply
iGame3D
Moderator
***


Posts: 231
Group: Moderators
Joined: Apr 2007
Status: Offline
Reputation: 0
Post: #2
RE: debugger for MurgaLua?

I expect the other software is coded to run vanilla lua only,
and it runs the script against that.
Is vanilla lua on your system or part of the software?

If its on your system, delete, rename a copy of murgaLua to lua5.x.x whatever,
and fool the software. That should work....

I suppose reading Chapter 23: The Debug Library
would help to run your script in murgaLua and get debug values as results.

I'm just running and crashing in terminal and iGame3D, checking the console logs alot.

Maybe I should read Chapter 23...


EDIT -- This might be a BUG
Lua works with the example function in Chapter 23.
Murgalua returns

Code:
stdin:4: attempt to index global 'debug' (a function value)


debug.getinfo() is working outside of functions in murgaLua, but you
get that error if its inside a function. I first found out with this:

Code:
function dbug()
Fun = print
Bug = debug.getinfo(Fun)
for i,v in pairs(Bug) do print(i,v) end
end

This post was last modified: 02-20-2008 07:02 PM by iGame3D.

02-20-2008 06:40 PM
Visit this user's website Find all posts by this user Quote this message in a reply
znarf
Junior Member
**


Posts: 34
Group: Registered
Joined: Jun 2007
Status: Offline
Reputation: 0
Post: #3
RE: debugger for MurgaLua?

Hi iGame3d,

by "vanilla" I mean a pure Lua without any "murgaesque" extensions as you can obtain from the http://www.lua.org website. I'm aware of Lua's built-in debug library, but for using it directly as debugger I would consider it way too cumbersome. Or to cite Chapter 23, "The debug library does not give you a debugger for Lua, but it offers all the primitives that you need for writing a debugger for Lua."
You are right, for getting better insights into my problems to get MurgaLua working with sciteDebug, a test of the debugger library in MurgaLua would be a good step to narrow down the possible causes.
While I started myself using print statements directly in the code for debugging as well, I've become a very big fan of regular debuggers lately and would consider their availability as a key must-have feature for a truly productive development platform. I'm not sure if it's realistic, but I would be very delighted if it would be possible to integrate a lightweight debugger such as clidebugger directly into murgaLua and provide something like a debug mode which would allow you to inspect the program flow, variable values, and the call stack immediately during runtime.
If I come up with a good idea, I'll post it here.

This post was last modified: 02-21-2008 07:58 AM by znarf.

02-21-2008 07:57 AM
Find all posts by this user Quote this message in a reply
JohnMurga
Administrator
*******


Posts: 381
Group: Administrators
Joined: Apr 2007
Status: Offline
Reputation: 2
Post: #4
RE: debugger for MurgaLua?

I've put it on my todo for the release after next ...

02-21-2008 09:50 AM
Visit this user's website Find all posts by this user Quote this message in a reply
znarf
Junior Member
**


Posts: 34
Group: Registered
Joined: Jun 2007
Status: Offline
Reputation: 0
Post: #5
RE: debugger for MurgaLua?

I've taken now a closer look at clidebugger under MurgaLua, and it works fine as command line debugger. We can now be pretty sure that there is nothing wrong with MurgaLua's inclusion of Lua's standard debug library (which is called internally by clidebugger).

This means that pure clidebugger already provides all the features I wanted to have in my last post out of the box. The only disadvantage is its minimalistic command line interaction. So I get really tempted to write a little UI for it in MurgaLua itself.

Let's see...

This post was last modified: 02-21-2008 09:56 AM by znarf.

02-21-2008 09:53 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: