Debug - A whole new way of debugging your game

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
asurakyo
Prole
Posts: 8
Joined: Tue Mar 01, 2011 6:30 am

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

Post by asurakyo »

useful
User avatar
genericdave
Citizen
Posts: 53
Joined: Tue Dec 15, 2009 9:08 am

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

Post by genericdave »

Sweet! I made a much crappier version of this exact thing about forever and a half ago. I will totally be using this.

Something along these lines really out to be included in the love 2d library itself. You could just set a debug flag and have a nice little console on non-Windows systems. Unless that has changed in the last year or two and now there is standard console output, that is.
User avatar
schme16
Party member
Posts: 127
Joined: Thu Oct 02, 2008 2:46 am

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

Post by schme16 »

This has been of tremendous use so far!
Due to my inherit nature of laziness I've always hated having to to switch focus to console,, then back again, this has solved that and made my life a little easier
My Development Diary - http://shanegadsby.info
User avatar
kalle2990
Party member
Posts: 245
Joined: Sat Sep 12, 2009 1:17 pm
Location: Sweden

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

Post by kalle2990 »

Thanks for your appreciation, I'm actually working on an update with auto-completion functions and a few other things, it will be released soon :)
User avatar
Lap
Party member
Posts: 256
Joined: Fri Apr 30, 2010 3:46 pm

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

Post by Lap »

Hope this project is still in production.

Is there a way to see the stack trace of an error as well?

Any plans for allowing automatic logging to a file?
User avatar
kalle2990
Party member
Posts: 245
Joined: Sat Sep 12, 2009 1:17 pm
Location: Sweden

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

Post by kalle2990 »

The problem with my projects is that nearly no one ever gets finished, somewhy.. However, since it's easter this week I'm aiming to do some work on this ;) We'll see if I can get something working..
User avatar
Lap
Party member
Posts: 256
Joined: Fri Apr 30, 2010 3:46 pm

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

Post by Lap »

If it helps to motivate you I'd like to say that this project can easily become the most widely used "library" of anything in LOVE as it helps out any and every project. There's no way effort on this project will get wasted or forgotten.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

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

Post by Robin »

I found some things:

Line 81:

Code: Select all

local index = tonumber(string.sub(str, 2, string.len(str)))
This could be

Code: Select all

local index = tonumber(str:sub(2))

Code: Select all

if not love.quit then

	xpcall(function() quit = love.quit() end, _Debug.handleError)

end
This calls love.quit() if it doesn't exist.

skipEvent is not used.
Help us help you: attach a .love.
User avatar
kalle2990
Party member
Posts: 245
Joined: Sat Sep 12, 2009 1:17 pm
Location: Sweden

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

Post by kalle2990 »

I've uploaded an unstable version of this containing some new features/fixes, which can be found in OP or here. It features:
  • Auto-complete early testing
  • Small fixes (thanks Robin :D)
The stacktrace won't probably be do-able, because of the error catching interface in lua, if I print a trace it will only show a few lines telling it couldn't be traced. However, I might add some autoscrolling features when the list is at the bottom.

Also, the auto-completion will later be toggled between the options in some way. Since the up/down arrows will be used for command history I will not be able to use them, if someone has an opinion of what key(s) they prefer I'd be happy to know, otherwise I might just use tab. There will also be drawn some box so the proposals doesn't go into long outputs, making both unreadable.

EDIT: This fix also includes fixing of a bug which drew all the lines below the visible ones, causing huge FPS drops.
chrism
Prole
Posts: 21
Joined: Wed May 25, 2011 6:17 pm

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

Post by chrism »

When I include this in my project, I get the debug console but I seem to lose all the behavior in my love.keypressed() function. What's the proper way to integrate this into a project that already has keypressed/mouse behaviors?
Post Reply

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 1 guest