Page 3 of 11

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

Posted: Wed Mar 02, 2011 6:42 am
by asurakyo
useful

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

Posted: Mon Mar 07, 2011 12:33 am
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.

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

Posted: Mon Mar 07, 2011 5:01 am
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

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

Posted: Mon Mar 07, 2011 3:57 pm
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 :)

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

Posted: Sun Apr 17, 2011 9:22 pm
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?

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

Posted: Sun Apr 17, 2011 10:22 pm
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..

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

Posted: Sun Apr 17, 2011 11:49 pm
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.

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

Posted: Mon Apr 18, 2011 6:18 am
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.

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

Posted: Mon Apr 18, 2011 3:32 pm
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.

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

Posted: Thu Jul 21, 2011 6:05 pm
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?