Debug - A whole new way of debugging your game

asurakyo
Prole
Posts: 8
Joined: Tue Mar 01, 2011 6:30 am

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

useful

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

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

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.

schme16
Party member
Posts: 127
Joined: Thu Oct 02, 2008 2:46 am

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

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

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

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

Lap
Party member
Posts: 256
Joined: Fri Apr 30, 2010 3:46 pm

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

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?

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

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..

Lap
Party member
Posts: 256
Joined: Fri Apr 30, 2010 3:46 pm

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

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.

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

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.

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

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 )
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

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?

Who is online

Users browsing this forum: No registered users and 30 guests