On Jan 27, 2007, at 8:57 AM, Filipe Correia wrote: > >>> Having to change the source code to debug it doesn't feel very >>> right... >> And adding print statements is...what? > > I agree :) And that's why, to me, neither seem the right way to go... > (then again, using prints is the most effective way I have found, and > I guess pdb is probably equivalent)
Actually, pdb is much more effective and not the same as print statements. In the debugger, you can not only print out variable values, but you can change those values as well. You can't do that with print statements. With a print statement, you need to specify which value you want to print before execution. In the debugger, you can look step through your program a line at a time and look at any value you can think of. Using print statements to debug a program is like figuring out what is wrong with your car by listening for weird noises. Using a debugger is like opening the hood and tweaking the engine with tools. Don --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---