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.
-
kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
-
Contact:
Post
by kikito » Wed Jun 20, 2012 8:38 pm
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.
-
Jasoco
- Inner party member
- Posts: 3655
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
-
Contact:
Post
by Jasoco » Wed Jun 20, 2012 9:53 pm
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.
-
ejmr
- Party member
- Posts: 302
- Joined: Fri Jun 01, 2012 7:45 am
- Location: South Carolina, U.S.A.
-
Contact:
Post
by ejmr » Wed Jun 20, 2012 10:52 pm
Thank you everyone for the suggestions and advice.

-
vernon
- Prole
- Posts: 18
- Joined: Fri Oct 07, 2011 3:54 pm
Post
by vernon » Thu Jun 21, 2012 1:27 am
I debug by asking stupid questions on the IRC channel
-
Albright
- Prole
- Posts: 1
- Joined: Sat Jun 23, 2012 1:43 pm
Post
by Albright » Sat Jun 23, 2012 1:47 pm
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.
Users browsing this forum: Google [Bot] and 28 guests