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 
Debugging with murgaLua - Tutorial
Author Message

Posts: 381
Group: Administrators
Joined: Apr 2007
Status: Offline
Reputation: 2
Post: #1
Debugging with murgaLua - Tutorial

MurgaLua now incorporates a customized version of remDebug.

Soon there will be a GUI for this, but until then here is how to use it.

Invocation :

  • The traditional remDebug way ...
    Adding the following to your code :
    require "remdebug.engine"
  • From the command line ...
    Invoking your program with :
    murgaLua -e "remdebug.engine.start();dofile ('test.lua')"
Tutorial :
  • Open two command line windows.
    One for the debug console, one from the program to be run.
  • Go to the tests/debug directory on both prompts.
  • Run the debug console on one prompt.
    murgaLua controller.lua
  • Switch to the other prompt and run the test program.
    murgaLua test.lua
  • Now switch back to the debug console.
    You should see a line that says "Paused at file" ...
  • Using the file path which is displayed for you type :
    setb "C:/murgaLua/tests/debug/test.lua" 22
  • Then try
    setw == 8
  • Now lets try running it and see what happens, type :
  • Now to see all the local variables try :
    eval murgaLua.debug.dumpTableAsLua(getfenv())

Cool huh :-)

Todo :
  • Testing :-)
  • FilterGlobals function, to return non-system global variables.
  • Decent UI.

John de Murga

10-13-2010 09:07 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
Debugging with murgaLua - Tutorial - JohnMurga - 10-13-2010 09:07 PM

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

Forum Jump: