Reply to Re: How to debug?

Your name:

Reply:


Posted by George Chapman on 10/06/05 23:26

Hi John

A couple of thoughts/options off the top of my head...

1) Use a high-end IDE like Zend Studio or ActiveState Komodo, which have
integrated debugging (my preference is Komodo)

2) Start developing using the Smarty templating engine,
http://smarty.php.net -- it has a debug setting that you can turn on and
off. When it's on, it will automatically generate JavaScript pop-up
windows showing variables

3) Start doing XP-style unit testing religiously. Several PHP folks were
inspired by Java's unit testing module, JUnit. Unfortunately this has
resulted in more than one project named PHPUnit (one of which is in PEAR
and distributed with PHP). IMHO, there is a better option, called
SimpleTest, which, contrary to it's name, has more of JUnit's feature-
set than either of the PHPUnits. And a great tutorial too.

http://www.lastcraft.com/simple_test.php
http://www.lastcraft.com/first_test_tutorial.php

It can be a bit confusing at first, but once you start unit testing,
your debugging sessions will be practically stress-free. I no longer
program without it.

Hope this helps,
GC


In article <vnZ0f.16268$iM2.1338518@news.xtra.co.nz>,
john.php@padasy.co.nz says...
> How can I debug a PHP program at all? Can/should I use a pop up a message on
> the screen showing a variable? Or is there a better way of testing the code?
>
> How can I pop up a message any way?
>
> Thanks a lot
> John
>
>
>
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация