Really cool! Congratulations for this work and exaplanation!

2009/6/3 sgtpep <danil.m...@gmail.com>:
>
> Unfortunately I have no expirience in screencasting, and my English is
> buggy.
>
> Debugging/logging tool is very useful thing for web development. I
> really like this one in Symfony framework (it is included to Symfony
> and made with JavaScript, screenshot -
> http://www.symfony-project.org/blog/2008/08/27/new-in-symfony-1-2-customize-the-web-debug-toolbar).
> For Django there is third-party module Django Debug Toolbar (http://
> rob.cogit8.org/blog/2008/Sep/19/introducing-django-debug-toolbar/).
>
> I think the most valuable things that this type of tools can show for
> developer are: accessible report to server-side logs pre request, info
> about queries executed during request and maybe some cache stats and
> variables list.
>
> Firebug (http://getfirebug.com/) is the most popular Firefox extension
> for web developent, very handy and well-built. It implements
> JavaScript console, DOM traversing, JS-debugging and lot more. FirePHP
> (http://www.firephp.org/) is another extension that uses Firebug
> interface and resources and therefore requires Firebug for work. You
> can see demo here (Firefox with both extensions required, open and
> enable Firebug console to see output) - 
> http://www.firephp.org/Examples/PHPArchitect/.
> In two words, FirePHP allows you to output log messages that you
> passed from PHP code, displays executed db queries, stack trace of
> exceptions, etc. It requires of using PHP class FirePHPCore/
> FirePHP.class.php. Firepy (documentation and screenshot -
> http://code.google.com/p/firepy/wiki/Documentation) is the
> implementation for Python of the server-side FirePHP library, but it
> uses the same Firefox extension (FirePHP). And it includes Middleware
> for using with Django, but you can easily adopt it for any Python
> framework.
>
> How-to for using FirePHP with web2py:
> 1) Open Firefox, install Firebug, FirePHP addons:
> https://addons.mozilla.org/ru/firefox/addon/1843,
> https://addons.mozilla.org/en-US/firefox/addon/6149. Restart browser.
> 2) Download http://www.box.net/shared/dtm0dhgze9 and extract 'firepy'
> folder.
> 3) Open directory with your current web2py application, and copy
> 'firepy' folder into 'modules' directory of application.
> 4) Edit first file in 'models' folder in your application (via web- or
> desktop-editor). Place these lines in top of the file:
>
> import sys
> sys.path += ['applications/%s/modules' % request.application]
> from firepy.web2py import start_firepy
> start_firepy(globals())
>
> 5) Edit some controller file and add this line to some controller
> function: logging.debug([1, {"asdf":(123, 2, "3")}, "3"])
> 6) Click on bug icon on bottom status line of Firefox. This will bring
> up panel. Check the checkbox "Console" and click "Apply settings".
> Ensure that tab "Console" is showing.
> 7) Navigate from browser to this application/controller/function. And
> now you should see your logging output in console ([1, {"asdf":(123,
> 2, "3")}, "3"]). If controller executes some db queries, then console
> will contain some info about them (sample screenshot
> http://firepy.googlecode.com/files/firepy.png). This is very
> interesting to know raw SQL-queries (especially for eduction, and for
> finding redundant or duplicating queries).
>
> Notice: Logs shows only if you are autorized in admin application.
> This check prevents from showing debugging logs for non-
> administrators.
>
> One disadvantage of this way is that it requires Firefox. But if you
> open your site in other browsers no errors will occur (logging info
> passes via HTTP headers). One possible way to support other browsers
> is to use Firebug Lite (pure JS implementation of extension) for them
> (http://getfirebug.com/lite.html) and modify or extend its code for
> adding FirePHP functionality.
>
> BTW, web2py is great, I really was charmed with it. It is most pytonic
> web framework and more flexible than most of them (I think it beats
> Django as well). Such debugging possibility will be a nice addition
> for it.


-- 
 Álvaro Justen
 Peta5 - Telecomunicações e Software Livre
 21 3021-6001 / 9898-0141
 http://www.peta5.com.br/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to