PHP execution tracing, does it exist?

Discussion in 'PHP' started by RaceDirector, Apr 26, 2010.

  1. #1
    I am getting into a bit of PHP modification, namely my vBulletin forum software. In the Windows world there are tracking apps that allow you to see each function call as it happens giving you a flow of the app. Does this sort of thing exist for PHP? Oopensource would be very much preferred and something that runs on MAC even more so...

    Cheers
    Bruce
     
    RaceDirector, Apr 26, 2010 IP
  2. RaceDirector

    RaceDirector Active Member

    Messages:
    122
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    70
    #2
    Found one - xdebug. Will give that a whirl. Of course, still open to suggestions.
     
    RaceDirector, Apr 26, 2010 IP
  3. Gray Fox

    Gray Fox Well-Known Member

    Messages:
    196
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    130
    #3
    Best PHP built-in code execution tracing function is debug_backtrace.
    You may also want to check KCacheGrind (which works together with xDebug). Another solution is Zend Studio + Zend Server, it's not free, but gives you a very good insight.
     
    Gray Fox, Apr 26, 2010 IP
  4. RaceDirector

    RaceDirector Active Member

    Messages:
    122
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    70
    #4
    Thanks GF, will check those out too
     
    RaceDirector, Apr 26, 2010 IP
  5. nezZario

    nezZario Peon

    Messages:
    45
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    if you really want to go deep, check out the tokenizer extension in PHP. you can do some really nifty, crazy stuff with it!

    you can also see http://us.php.net/manual/en/function.debug-print-backtrace.php
    and ALL of the error handling functions -- specifially set_error_handler() .. it may not look like you can do much with it on the outside, but do some digging and you surely can
     
    nezZario, Apr 27, 2010 IP
  6. RaceDirector

    RaceDirector Active Member

    Messages:
    122
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    70
    #6
    Excellent thanks. I am almost done setting up my dev environment afresh on my Mac. Will try all these things out.

    Cheers
    Bruce
     
    RaceDirector, Apr 27, 2010 IP
  7. bytes

    bytes Peon

    Messages:
    39
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    bytes, Apr 27, 2010 IP
    Gray Fox likes this.
  8. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #8
    How has xdebug worked out for you ?
    I was going to suggest that.
     
    joebert, Apr 28, 2010 IP
  9. bytes

    bytes Peon

    Messages:
    39
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #9
    as you can see from the screenshots from the link it has worked ok :) so notepad++ and DBGp plugin for it + xdebug. I believe there are some other solutions with xdebug for IDEs, but I tried that one since I'm using notepad++ now. Earlier I managed to install Zend Debugger and debug in Eclipse
     
    bytes, Apr 28, 2010 IP
  10. RaceDirector

    RaceDirector Active Member

    Messages:
    122
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    70
    #10
    I haven't finished my dev machine yet, damn medical stuff got in the way. I'll be trying either Eclipse or Coda as the dev environment, that is unless I can find something better that's opensource to replace Coda.... Hope to get started pretty soon though.

    Cheers
    RD
     
    RaceDirector, Apr 28, 2010 IP