Debugging Tools and Tips

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.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Debugging Tools and Tips

Post by kikito »

kclanc wrote:
vrld wrote:... using print() in clever places is probably the best option at the moment :(
I think that using a debugger and placing asserts and breakpoints is preferable to peppering code with prints.
Notice that vrld was talking about "using print in clever places", which is pretty much the opposite of "peppering code with prints". Being able to appreciate differences like that one really helps debugging.

I have not used a debugger (or a IDE, for that matter) in years, and I have not felt the need. I debug code with more code - sometimes with prints, and sometimes testing small bits of code in isolation. I find this more pleasant than using a tool someone else devised. But for this to work, however, I need my code to be "divisible" in small, independent chunks. But that happens to be a good design principle anyway.
When I write def I mean function.
User avatar
Jasoco
Inner party member
Posts: 3727
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Debugging Tools and Tips

Post by Jasoco »

kikito wrote:I usually debug via print.
Me too. And in cases where I need to know an objects specifications I created my own debugging system, or just print every child in the object's table into a block of text onto the screen.

I run my projects from the Terminal. But in one case I created my own debugging system where everything was printed into a console on-screen so I didn't need to keep Terminal running. But in the end I just use Terminal.

Occasionally I have wished the Console flag would open a Terminal window (In OS X) automatically like it does Windows, if only so I don't need Terminal open.
User avatar
ejmr
Party member
Posts: 302
Joined: Fri Jun 01, 2012 7:45 am
Location: South Carolina, U.S.A.
Contact:

Re: Debugging Tools and Tips

Post by ejmr »

Thank you everyone for the suggestions and advice. :)
ejmr :: Programming and Game-Dev Blog, GitHub
南無妙法蓮華經
User avatar
vernon
Prole
Posts: 18
Joined: Fri Oct 07, 2011 3:54 pm

Re: Debugging Tools and Tips

Post by vernon »

I debug by asking stupid questions on the IRC channel
Albright
Prole
Posts: 7
Joined: Sat Jun 23, 2012 1:43 pm

Re: Debugging Tools and Tips

Post by Albright »

Jasoco wrote:I run my projects from the Terminal. But in one case I created my own debugging system where everything was printed into a console on-screen so I didn't need to keep Terminal running. But in the end I just use Terminal.

Occasionally I have wished the Console flag would open a Terminal window (In OS X) automatically like it does Windows, if only so I don't need Terminal open.
I haven't tried it yet since I'm still a n00b, but I bet you could just open up a file handler and log to that, then use either Console or "tail -f" in the Terminal to "watch" it.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 9 guests