Debugging medium-sized projects

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Debugging medium-sized projects

Post by kikito » Sat Apr 17, 2010 4:29 pm

Hi there!

I'm starting to have problems with pew pew BOOM!

The thing is, I don't receive error messages any more, at all. Love just "stops silently". If I try the same version of passion on a simpler game, it gives me the error. But sometimes I don't know how to make that simpler game (too many things to test).

So I believe this is related with the number of files involved (I've got lots).

Right now I'm forced to "hunt bugs around" by using prints (this function started... this function ended).

Is there a better way? For example, can I download the LÖVE source code and trace the error somehow? (I'm using Ubuntu)

Thanks!
When I write def I mean function.

User avatar
nevon
Commander of the Circuloids
Posts: 938
Joined: Thu Feb 14, 2008 8:25 pm
Location: Stockholm, Sweden
Contact:

Re: Debugging medium-sized projects

Post by nevon » Sat Apr 17, 2010 4:45 pm

You didn't accidentally set a variable named debug to false? I've done that a couple of times without thinking about it.

User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Debugging medium-sized projects

Post by bartbes » Sat Apr 17, 2010 4:58 pm

Is it possible you have overridden the function error_printer or love.errhand? If not, you should always see the error on the console. (unless something really, really goes wrong)

User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Debugging medium-sized projects

Post by kikito » Sat Apr 17, 2010 6:46 pm

Ok, it was the debug variable.

I've been working without debug messages for a week now. I feel stupid... but what a relief!

Thank you thank you thank you.
Attachments
pew-pew-boom.love
Error on main.lua (mispelled passsion)
(65.42 KiB) Downloaded 57 times
When I write def I mean function.

User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Debugging medium-sized projects

Post by bartbes » Sat Apr 17, 2010 6:47 pm

What, a debug variable?

EDIT: Oh right, the error handler uses lua's debug function which reside in the debug table, if you create a debug variable then it errors in the error handler...
EDIT2: I just pushed a commit that makes error_printer local (and thus a usable name in your code) and the debug table an upvalue to the error handles. (so, you can use debug in your code as well)

User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Debugging medium-sized projects

Post by kikito » Sat Apr 17, 2010 9:55 pm

Thank you bartbes!

That was very kind of you.
When I write def I mean function.

User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Debugging medium-sized projects

Post by bartbes » Sat Apr 17, 2010 9:58 pm

You will have to wait for the next release though.. keep that in mind.

User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Debugging medium-sized projects

Post by kikito » Sun Apr 18, 2010 2:00 pm

When I write def I mean function.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], CogentInvalid, Majestic-12 [Bot] and 10 guests