Go Back   Forum Care Forums > Development Reference Area > Php Development

Reply
 
LinkBack Thread Tools Display Modes
Re: PHP debugger
Old
  (#1)
Jared Farrish
Guest
 
Posts: n/a
Default Re: PHP debugger - 06-02-2007, 08:55 PM

Miles Thompson wrote:
> > Suggestions will be most welcome. Also, I'm not married to this, so if
> > anyone thinks there is a better debugger, please jump in.


The following ***umes object-oriented programming paradigms are at least
somewhat applied. I would guess functional would be similar, but procedural
code, you might be on your own there...

I actually use two cl***es that I include at the bottom of all of my library
definitions (in if(!cl***_exists()){declare}format). One provides warning
and error message storage, the other type ***ertion. Between the two of
these, I have simple unit testing that I can perform as I am developing a
cl***, as well as pre-included simple error logging that, when I install
into the greater system, can be incorporated into the systemic error
catching routines without refactoring code, in most cases to weld-on
systemic error routines.

Thinking aloud, getting code to work correctly usually means testing it
against what you expect it to do, so doing that at a very localized level
first can be helpful. Once I started doing this, my implementation issues
somewhat went away. Results (and implementations) may very.

> > PS Why are we doing this? Because we are getting tired of debugging
> > with Javascript alert() boxes. /mt


Firebug in Firefox is a very well-developed javascript debugger, featuring
console.log(), which allows you to stop using alert() for error checking.
Very nice! And I put this:

<code>
// Solve the firebug extension issue in IE by try/catching and creating a
blank object console.log();
try{console.log();}catch(e){var console=new
Object;console={log:function(){var k=0;}};};
</code>

At the head of each js file to prevent errors in IE or other browsers
without Firebug installed.

Example: http://web3.unt.edu/riskman/JS/lem.json.js

--
Jared Farrish
Intermediate Web Developer
Denton, Tx

Abraham Maslow: "If the only tool you have is a hammer, you tend to see
every problem as a nail." $$

   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Contact Us - Forum Care Forums - Archive - Top