On 5/26/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

How can we step through the TurboGears Python code?

you could start with http://docs.python.org/lib/module-pdb.html

another approach will be to use the logger which is a new feature since (0.9a6?) anyway I wrote a tutorial oriented to someone that has never use the logger before http://trac.turbogears.org/turbogears/wiki/logging and I jsut found out I forgot to link it from the main wiki page thanks for that :)

I come from the world of C++ with a really small experience in Python,
so I might overestimate the need for debugging. However, even those
unit testing is a great thing for preventing bugs to happen, stepping
through the code is one of the best ways for understanding how it
works.

yes your correct but the dinamic nature of python makes it more dificult for things like this to be done.

If TurboGears wants to reach the big audience (and it definitely
wants) the debugging methods for Windows are a must.

Why windows?  you need that for all OS.

Could anybody guide me how to step through the TG code? I tried couple
of naive approaches with Eclipse + PyDev with TG "start-wiki20.py" and
"setup-py test", but the first one crashed and breakpoints in the
second one didn't work. In return for your patience I promise to create
a complete no-brainer TG debugging tutorial for novices. Something
similar to
http://buildownwebsite.blogspot.com/2005/11/how-to-install-drupal-cms-in-3-simple.html

Such no-brainers as well as "20 Minute wiki" videocast help novices a
lot ;)

my personal approach when something goes really wrong is that I try to reproduce it on a python console, although this is a problem if testing something that comes from cherrypy.

anyway right now the logger is your best go.

hope that helps.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to