On Apr 28, 6:55 am, Johann Spies <[email protected]> wrote: > On 28 April 2010 13:42, Yarko Tymciurak <[email protected]> wrote: > > > try using a debugger, and step thru to see what your values are, what > > you logic is doing... you should find that helpful. > > > You can use winpdb; or you can grab an evaluation copy of WindIDE (I > > find Wing easier to use) - but either will work. > > Debugging normal python is not a problem to me, but I don't know how > to debug Web2Py.
You will need the source version of web2py to debug. For wing, see this: http://www.wingware.com/doc/howtos/web2py It's no more than creating a new project, selecting the top web2py directory, setting web2py.py as the default debugging file, then hitting the "go" (debug) button - I use the password parameter to avoid bringing up that darn TK window which asks for port and admin password - so locally, I just use the option: -a 'hello' and that's it (it remembers it, so it's easy). > I don't use Windows and I don't know how to see the > process you described in your earlier email. winpdb is a window'ed python debugger (i.e. IT has a gui) - it's NOT a Windows-based debugger ;-) (I know - confusing name; I use it on Linux) It's simpler to start, a little harder to use: from your web2py directory, you start your web2py manually, except call it with winpdb instead of python, e.g.: winpdb web2py.py -a 'hello' You sit at the first line of web2py.py when winpdb comes up. You could then: file -> open source ... to your controller file, and ... set a breakpoint from the command window. http://winpdb.org/docs/breakpoints/ It's not too bad. Once set, just hit the "vcr" like "GO" button in the upper right, and browse to your web2py instance with your favorite browser, intil you hit the breakpoint on the way to your "request". Have lost of fun with it! Regards, - Yarko > > Regards > Johann > -- > "Finally, brethren, whatsoever things are true, whatsoever things are > honest, whatsoever things are just, whatsoever things are pure, > whatsoever things are lovely, whatsoever things are of good report; if > there be any virtue, and if there be any praise, think on these > things." Philippians 4:8

