Page 2 of 2

Re: Debugging Tools and Tips

Posted: Wed Jun 20, 2012 8:38 pm
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.

Re: Debugging Tools and Tips

Posted: Wed Jun 20, 2012 9:53 pm
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.

Re: Debugging Tools and Tips

Posted: Wed Jun 20, 2012 10:52 pm
by ejmr
Thank you everyone for the suggestions and advice. :)

Re: Debugging Tools and Tips

Posted: Thu Jun 21, 2012 1:27 am
by vernon
I debug by asking stupid questions on the IRC channel

Re: Debugging Tools and Tips

Posted: Sat Jun 23, 2012 1:47 pm
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.