LoveDebug - A whole new way of debugging your game

Showcase your libraries, tools and other projects that help your fellow love users.
Grubby
Prole
Posts: 35
Joined: Sat Jun 01, 2013 2:46 am

Re: LoveDebug - A whole new way of debugging your game

Post by Grubby »

To whom ever came up with this and or maintains it, a BIG thumbs up. I'm impressed. Ya just can't make it any easier then this. As a newbie, this is a prefect intro to active/dynamic debugging. As a lazy sap. this is perfect for extending the time I can avoid learning how to properly debug and profile my code. I'll have to do that some day, but not right now.

For me all it took was to add my wonky files for monitoring, a single require, hit ctrl+shift+f8, type in a few 'for' loops, and I was able to see my screw ups within ten minutes. The previous day I looked over and mucked around with my code for over 3 hours and accomplished nothing. I had no idea why my simulation was acting so strange. This even included some of my normally printed data and graphics randomly disappearing without even a peep from lua/love2d. I can't verbally describe the problems, but it all revolved around something like this:

t={}
t[1] = true t[2] = 3 t[3] = 57 t[4] = "magnum"

t[1] = nil <--Oops

for k, v in ipairs(t) do
print(t[k])
end

A salute to LoveDebug!
User avatar
Ranguna259
Party member
Posts: 911
Joined: Tue Jun 18, 2013 10:58 pm
Location: I'm right next to you

Re: LoveDebug - A whole new way of debugging your game

Post by Ranguna259 »

Since this is a community project then you are thanking all of LÖVE's users that have worked on this :ultraglee:, they are all listed on the first post.
I'm glad you found this tool useful and if you have any new ideas for LoveDebug then feel free to make a pull request on github.
LoveDebug- A library that will help you debug your game with an on-screen fully interactive lua console, you can even do code hotswapping :D

Check out my twitter.
User avatar
Ranguna259
Party member
Posts: 911
Joined: Tue Jun 18, 2013 10:58 pm
Location: I'm right next to you

Re: LoveDebug - A whole new way of debugging your game

Post by Ranguna259 »

I just want to update you guys on lovedebug.
admin36 added a way to not halt you code while the console is open and I added a HUD that shows all the errors in real time.
Also, all the bugs with the window not showing up due to graphical transformations have been fixed, now you can transform your game's graphics without effecting the console.

Image

Check out the first page to download the latest lovedebug 1.4.0, thanks for reading.
LoveDebug- A library that will help you debug your game with an on-screen fully interactive lua console, you can even do code hotswapping :D

Check out my twitter.
Grubby
Prole
Posts: 35
Joined: Sat Jun 01, 2013 2:46 am

Re: LoveDebug - A whole new way of debugging your game

Post by Grubby »

Curious...

Unofficial 1.4.0 is quite a spred from official 1.1.5. So why is this always tagged as ""unofifical"" when clearly the ""official" code from 1.1.5 isn't likely to work with a modern version of L2d? I'd imagine that when L2d hits the 1.0 release things are going to get worse. If the original author isn't around to update the code and you can't contact him, maybe its time for the current code base to become "Official"... Just say'n!
User avatar
Ranguna259
Party member
Posts: 911
Joined: Tue Jun 18, 2013 10:58 pm
Location: I'm right next to you

Re: LoveDebug - A whole new way of debugging your game

Post by Ranguna259 »

Grubby wrote:Curious...

Unofficial 1.4.0 is quite a spred from official 1.1.5. So why is this always tagged as ""unofifical"" when clearly the ""official" code from 1.1.5 isn't likely to work with a modern version of L2d? I'd imagine that when L2d hits the 1.0 release things are going to get worse. If the original author isn't around to update the code and you can't contact him, maybe its time for the current code base to become "Official"... Just say'n!
Let's just leave it as is, I'll respect the original developer at least until LÖVE 1.0 hits.
LoveDebug- A library that will help you debug your game with an on-screen fully interactive lua console, you can even do code hotswapping :D

Check out my twitter.
TheNiny
Prole
Posts: 13
Joined: Sun Dec 20, 2015 2:45 am

Re: LoveDebug - A whole new way of debugging your game

Post by TheNiny »

Is there a way of changing they hotkey for the debug console? I LOVE this plugin but would like it to be activated by tab.
~The Niny
"Sna.ke", a agar.io and snake mix.
User avatar
Ranguna259
Party member
Posts: 911
Joined: Tue Jun 18, 2013 10:58 pm
Location: I'm right next to you

Re: LoveDebug - A whole new way of debugging your game

Post by Ranguna259 »

Sorry for replying so late.
Yeah, there's a way to change the hotkey but you'll need to create a global variable called "_lovedebugpresskey" and set it to "tab", this was added to version 1.2 by Qcode, but I'll change that in the next update so the key is set to a new variable in _DebugSettings instead of being tied to a global variable, unless you code that first, if so then check line 511 of lovedebug's code, that's lovedebug checks for the hotkey.
LoveDebug- A library that will help you debug your game with an on-screen fully interactive lua console, you can even do code hotswapping :D

Check out my twitter.
TheNiny
Prole
Posts: 13
Joined: Sun Dec 20, 2015 2:45 am

Re: LoveDebug - A whole new way of debugging your game

Post by TheNiny »

Awesome! Thanks!
~The Niny
"Sna.ke", a agar.io and snake mix.
garcia1000
Prole
Posts: 34
Joined: Sat Nov 28, 2015 5:54 am

Re: LoveDebug - A whole new way of debugging your game

Post by garcia1000 »

This is a really great tool and I deleted some of my own debug tools after I found this gem!

One question about compatibility with other "middlewares". I put in strict.lua (http://metalua.luaforge.net/src/lib/strict.lua.html) into my game to check for global variables, but it conflicts with Lovedebug. Is this unavoidable because they both modify the same things?
User avatar
Sulunia
Party member
Posts: 203
Joined: Tue Mar 22, 2016 1:10 pm
Location: SRS, Brazil

Re: LoveDebug - A whole new way of debugging your game

Post by Sulunia »

So, i tried to use this nice script in my game. However...

For some odd reason, luafft now returns me an error, bragging about some debugging function not existing, when in fact it does.

With that error, the game splashcreen just stalls. I can hover at the button, but clicking it does nothing.

Actually, looking at the source code of both lovedebug and luafft i found the problem...

You guys use a variable named "msg" whilst luafft uses it as a "function"

What should i do? I really didn't plan on messing around with the source code of none of the external libs i used. I don't even know if i'm allowed to do so.
Don't check my github! It contains thousands of lines of spaghetti code in many different languages cool software! :neko:
https://github.com/Sulunia
Post Reply

Who is online

Users browsing this forum: Amazon [Bot] and 1 guest