Re: Debugging classes

From: Date: Tue, 22 Jan 2008 23:42:49 +0000
Subject: Re: Debugging classes
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-267866@lists.php.net to get a copy of this message
Vishal Patel schreef:
i dont know why the hell im on it so please whoever did this, i wish they would stop fucking about with my account. please can you unsuscribe me to all such mailing lists as at the moment im recieving about 10 new emails a minute about all this stuff which im sure you can understand is so annoying
unsubscribe yourself. and stop bothering me please. it's not my problem. visit here: http://www.php.net/unsub.php or send an email to php-general-unsubscribe@lists.php.net (as detailed in the headers of the email you recieve from the mailing list.)
many thanks On Jan 22, 2008 11:33 PM, Jochem Maas <jochem@iamjochem.com <mailto:jochem@iamjochem.com>> wrote:
    Vishal Patel schreef:
who the fuck are you and why the fuck are you emailing me
    I'm fucking me actually. and I'm fucking mailing a fucking mailing
    list which
    apparently your fucking subscribed to. So now your fucking up to speed.
    Any other fucking questions?
On Jan 22, 2008 11:15 PM, Jochem Maas <jochem@iamjochem.com
    <mailto:jochem@iamjochem.com>
<mailto:jochem@iamjochem.com <mailto:jochem@iamjochem.com>>> wrote:
    TG schreef:
I have a semi-good understanding of classes even if I don't
    totally 'grok'
the benefits for the projects I've worked on so far. One thing that keeps smacking me in the face, though, is
    reverse
    engineering
in order to make proper changes to projects created by others
    using classes.
In particular, I've been doing a lot of Joomla work and I
    end up
    doing a
global "find in files" trying to trace things back to see
    where
    they're
assigned, etc. In particular 2, "$this". I know it's a keyword meaing "the
    active object"..
I'm cool with that, but sometimes I need to make changes
    to how
    things are
handled, or what data is included. I can do a print_r and
    see
    what type of
object it is, look up the class definition, etc, but it still
    seems like a
pretty cumbersome way of doing things.
    debug_print_backtrace() is your friend. that said get an
    editor that
    supports
    debugging and install the required debugging extension on the
    server
    (which
    will probably be your local machine) this will allow you to
    initiate
    a debug session
    that allows you to step through the code line by line.
    I use Zend (debugger & IDE) for this, there are other options but
    I'm lazy and I've
    never had the patience to setup PHPEclipse+Xdebug (or
    something similar)
Anyone have any tips for debugging/reverse
    engineering/noodling-out classes
on big projects created by someone else? I figure things out eventually, I just want to speed up the
    process and do it
'smarter' if possible.
    debugging is a bit of a black art. the more you do it the handier
    and more comfortable
    you get at doing it. it's a bit like sex but with out the
    reward ;-)
Thanks! -TG
    --
    PHP General Mailing List ( http://www.php.net/
    <http://www.php.net/>)
    To unsubscribe, visit: http://www.php.net/unsub.php
-- Vishal Patel -- Vishal Patel


« previous php.general (#267866) next »