Using Eclipse LDT debugger for Mods

Post Reply
User avatar
Neuromancer
Member
Posts: 964
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

Using Eclipse LDT debugger for Mods

by Neuromancer » Post

I think I'm really close to debugging Mods in Eclipse LDT. I'm doing this in Windows, but hopefully most of this applys to other OSes as well. I'll keep this OP updated as I figure it out. You will get most of your info here: https://wiki.eclipse.org/LDT/User_Area/ ... _Guide_1.0 Especially the Attach Debug section.
  • Steps:
  • Install 7zip as it will help you decompress tar.gz files.
  • Download Lua Binaries and put them in c:\lua. http://sourceforge.net/projects/luabina ... ecutables/ I chose file: lua5_1_4_Win32_bin.zip
  • Download lua.h for 5.1 from lua Source and put it in c:\lua. lua5_1_4_Win32_bin.zip. Click on lua.h. Select all the code in the browser. Paste it into notepad++. Clean up anything that isn't code. Save the file as lua.h
  • use notepad++ to create a new text file with the following content:
    require("debugger")(idehost, ideport, idekey)
    Save it as c:\lua\debugger.lua
    Note this file will be automatically overwritten with all kinds of stuff later on.\
  • Download luarocks @ https://github.com/keplerproject/luarocks/wiki/Download will take you to http://keplerproject.github.io/luarocks/releases/ I chose luarocks-2.3.0-win32.zip.
  • Install luarocks (all the steps up to this point were to get this to work). Basically you doubleclick the install file in the luarocks folder that you unzipped.
  • Keep trying to install until luarocks lets you know the installation was successful.
  • download eclipse ldt from here: http://www.eclipse.org/ldt/ I chose standalone product, stable release 1.3 windows 32 bit.
  • Run eclipse Ldt: doubleclick LuaDevelopmentTools.exe
  • Select File>New>Project select all the defaults, but point the folder to minetest\mods\yourmod folder
  • Select Run>Debug Configurations> Under the connect tab on the right click on the "Lua Debugger Client" link
  • I forgot what happens when you do this, but just accept any defaults if a wizard pops up.
  • Then in the left pane "Script Explorer" double click init.lua to open the file.
  • Set a breakpoint by double clicking on the narrow gray column just to the left of the line you want to break on.
  • Open minetest and make sure the mod is configured for the world you want to go into.
  • Select run debug (This might be my problem) as it seems to be trying to run the mod before minetest runs it.
  • Play the minetest world.
    This is where I get stuck. Ideas anyone?

Rochambeau
Member
Posts: 119
Joined: Tue Sep 23, 2014 11:37

Re: Using Eclipse LDT debugger for Mods

by Rochambeau » Post


Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests