Any method to trace function and execution calls?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Darren Dunham

    Any method to trace function and execution calls?

    I've had to do some work with an existing PHP application.
    Unfortunately, the app is pretty big, undocumented, and heavily (and in
    some places, inappropriately ) abstracted. I've spent a day with it and
    am having a difficult time just trying to understand who calls what and
    passes what information to functions overloaded from a class called via
    a three-level-deep require...

    Is there any method of logging or displaying some kind of call trace as
    a php program is run? That way I could at least tell which functions
    are getting called with which arguments.

    Thanks for any help with this.

    --
    Darren Dunham ddunham@taos.co m
    Senior Technical Consultant TAOS http://www.taos.com/
    Got some Dr Pepper? San Francisco, CA bay area
    < This line left intentionally blank to confuse you. >
  • CptDondo

    #2
    Re: Any method to trace function and execution calls?

    Darren Dunham wrote:
    I've had to do some work with an existing PHP application.
    Unfortunately, the app is pretty big, undocumented, and heavily (and in
    some places, inappropriately ) abstracted. I've spent a day with it and
    am having a difficult time just trying to understand who calls what and
    passes what information to functions overloaded from a class called via
    a three-level-deep require...
    >
    Is there any method of logging or displaying some kind of call trace as
    a php program is run? That way I could at least tell which functions
    are getting called with which arguments.
    >
    Thanks for any help with this.
    >
    syslog

    or you can try to recompile PHP with xdebug <http://www.xdebug.org/>

    --Yan

    Comment

    • naixn

      #3
      Re: Any method to trace function and execution calls?

      CptDondo wrote :
      Darren Dunham wrote:
      >I've had to do some work with an existing PHP application.
      >Unfortunatel y, the app is pretty big, undocumented, and heavily (and in
      >some places, inappropriately ) abstracted. I've spent a day with it and
      >am having a difficult time just trying to understand who calls what and
      >passes what information to functions overloaded from a class called via
      >a three-level-deep require...
      >>
      >Is there any method of logging or displaying some kind of call trace as
      >a php program is run? That way I could at least tell which functions
      >are getting called with which arguments.
      >>
      >Thanks for any help with this.
      >
      syslog
      >
      or you can try to recompile PHP with xdebug <http://www.xdebug.org/>
      >
      --Yan
      Why recompile ? It works well as an extension :p

      Use http://kcachegrind.sf.net/ to read xdebug generated files :)

      --
      Naixn

      Comment

      • CptDondo

        #4
        Re: Any method to trace function and execution calls?

        naixn wrote:
        >or you can try to recompile PHP with xdebug <http://www.xdebug.org/>
        >>
        >--Yan
        >
        Why recompile ? It works well as an extension :p
        >
        Use http://kcachegrind.sf.net/ to read xdebug generated files :)
        >
        Maybe on your system.... :-) Unfortunately on my embedded box
        extensions don't work and have to be compiled in.

        Good point, though. I never thought about that.

        --Yan

        Comment

        • Darren Dunham

          #5
          Re: Any method to trace function and execution calls?

          naixn <naixn@won-fma.comwrote:
          CptDondo wrote :
          >Darren Dunham wrote:
          >>>
          >>Is there any method of logging or displaying some kind of call trace as
          >>a php program is run? That way I could at least tell which functions
          >>are getting called with which arguments.
          >>>
          >>Thanks for any help with this.
          >>
          >syslog
          >>
          >or you can try to recompile PHP with xdebug <http://www.xdebug.org/>
          >>
          >--Yan
          Why recompile ? It works well as an extension :p
          Use http://kcachegrind.sf.net/ to read xdebug generated files :)
          Thank you both. That looks like it will be very useful.

          --
          Darren Dunham ddunham@taos.co m
          Senior Technical Consultant TAOS http://www.taos.com/
          Got some Dr Pepper? San Francisco, CA bay area
          < This line left intentionally blank to confuse you. >

          Comment

          Working...