best command line debugger for php

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

    best command line debugger for php

    everyone,

    I'd like to be able to debug php scripts on the command line, going
    through the
    browser. In other words, set up the debugger to listen and then type
    in a url and have the code stop before displaying stuff to the
    browser. Then, step through each individual piece of code, etc, whilst
    having the output mirrored to either another file or the debugger
    screen...

    Anyway, I tried dbg, but it doesn't seem to support this, as far as
    I'm aware (ie: you need to set the url, etc inside of the debugger,
    and I'm still trying to figure out arguments/etc with it.). I'm not
    too hot on a graphical debugger - I'd rather be able to stick with
    emacs.

    Any suggestions would be greatly appreciated.

    thanks again,

    jon
  • Michael Vilain

    #2
    Re: best command line debugger for php

    In article <f05e664d.04090 80042.4dfe908@p osting.google.c om>,
    ttyp32000@yahoo .com (jonathan) wrote:
    [color=blue]
    > everyone,
    >
    > I'd like to be able to debug php scripts on the command line, going
    > through the
    > browser. In other words, set up the debugger to listen and then type
    > in a url and have the code stop before displaying stuff to the
    > browser. Then, step through each individual piece of code, etc, whilst
    > having the output mirrored to either another file or the debugger
    > screen...
    >
    > Anyway, I tried dbg, but it doesn't seem to support this, as far as
    > I'm aware (ie: you need to set the url, etc inside of the debugger,
    > and I'm still trying to figure out arguments/etc with it.). I'm not
    > too hot on a graphical debugger - I'd rather be able to stick with
    > emacs.
    >
    > Any suggestions would be greatly appreciated.
    >
    > thanks again,
    >
    > jon[/color]

    I'm not aware of any debugger like perl's built-in command line debugger
    that comes with the base php. Zend makes a Windows/MacOS X/Linux-based
    IDE with a debugger (http://www.zend.org) for $249. There's a free eval
    available if you want to try it out.

    If you're looking for something like perl or gdb's debugger, you're
    probably SOL.

    --
    DeeDee, don't press that button! DeeDee! NO! Dee...



    Comment

    • JV

      #3
      Re: best command line debugger for php

      the way i understand dbg is that you have (on the server where apache & php
      are set up) a command line tool similar to gdb for cpp. while I've not got
      this working quite right (i need to recomile php) it should be qimple to set
      up.
      i need to install php5 to get it to work, due to a missing file in my
      current installation. I havent yet due to concerns as to whether or not it
      will interfere with existing site tools (ENSIM) but heres the link to the
      page with the 2 files you will have to download



      these files



      after getting the dbg-cli (the second one) program downloaded and installed
      i figured that i needed to install the server part (the first one) too and
      thats stopping me atm.

      also make sure to read the README and the INSTALL files in both packages.

      please let me know how it goes if you can.

      HTH
      JV


      Comment

      • jonathan

        #4
        Re: best command line debugger for php

        "JV" <jveil.hotpop@c om> wrote in message news:<37A%c.131 671$9d6.15844@a ttbi_s54>...[color=blue]
        > the way i understand dbg is that you have (on the server where apache & php
        > are set up) a command line tool similar to gdb for cpp. while I've not got
        > this working quite right (i need to recomile php) it should be qimple to set
        > up.
        > i need to install php5 to get it to work, due to a missing file in my
        > current installation. I havent yet due to concerns as to whether or not it
        > will interfere with existing site tools (ENSIM) but heres the link to the
        > page with the 2 files you will have to download
        >
        > http://dd.cron.ru/dbg/downloads.php
        >
        > these files
        > http://dd.cron.ru/dbg/download.php?h=211.30-src
        > http://dd.cron.ru/dbg/download.php?h=211.30-cli-src
        >
        > after getting the dbg-cli (the second one) program downloaded and installed
        > i figured that i needed to install the server part (the first one) too and
        > thats stopping me atm.
        >
        > also make sure to read the README and the INSTALL files in both packages.
        >
        > please let me know how it goes if you can.
        >
        > HTH
        > JV[/color]


        yes, I've tried dbg-cli -

        1) doesn't support POST
        2) no integration with browser

        that's why I was hoping for an alternative. Anyone who's got one,
        please let me know... I'd love to be able to just run things in my
        browser and have them show up in a terminal window.. I dislike
        graphical debuggers quite a bit..

        jon

        Comment

        • Average_Joe

          #5
          Re: best command line debugger for php

          In article <f05e664d.04090 81100.1b813f@po sting.google.co m>, jonathan wrote:[color=blue]
          > "JV" <jveil.hotpop@c om> wrote in message news:<37A%c.131 671$9d6.15844@a ttbi_s54>...[color=green]
          >> the way i understand dbg is that you have (on the server where apache & php
          >> are set up) a command line tool similar to gdb for cpp. while I've not got
          >> this working quite right (i need to recomile php) it should be qimple to set
          >> up.
          >> i need to install php5 to get it to work, due to a missing file in my
          >> current installation. I havent yet due to concerns as to whether or not it
          >> will interfere with existing site tools (ENSIM) but heres the link to the
          >> page with the 2 files you will have to download
          >>
          >> http://dd.cron.ru/dbg/downloads.php
          >>
          >> these files
          >> http://dd.cron.ru/dbg/download.php?h=211.30-src
          >> http://dd.cron.ru/dbg/download.php?h=211.30-cli-src
          >>
          >> after getting the dbg-cli (the second one) program downloaded and installed
          >> i figured that i needed to install the server part (the first one) too and
          >> thats stopping me atm.
          >>
          >> also make sure to read the README and the INSTALL files in both packages.
          >>
          >> please let me know how it goes if you can.
          >>
          >> HTH
          >> JV[/color]
          >
          >
          > yes, I've tried dbg-cli -
          >
          > 1) doesn't support POST
          > 2) no integration with browser[/color]

          I tried dbg-cli too, but in my case, I explicitly DON'T want any
          integration with the browser or the web server, so it wouldn't work for
          me either.
          [color=blue]
          > that's why I was hoping for an alternative. Anyone who's got one,
          > please let me know... I'd love to be able to just run things in my
          > browser and have them show up in a terminal window.. I dislike
          > graphical debuggers quite a bit..[/color]

          Aside from: tail -f error_log ..... and/or strategic die("BPfoo"); statements...

          I'm afraid we're out of luck for now.

          Jamie
          --
          http://www.geniegate.com Custom web programming
          User Management Solutions Perl / PHP / Java / UNIX

          Comment

          • steve

            #6
            Re: Re: best command line debugger for php

            "user235" wrote:[color=blue]
            > In article <f05e664d.04090 80042.4dfe908@p osting.google.c om>,
            > ttyp32000@yahoo .com (jonathan) wrote:
            >[color=green]
            > > everyone,
            > >
            > > I’d like to be able to debug php scripts on the command[/color]
            > line, going[color=green]
            > > through the
            > > browser. In other words, set up the debugger to listen and then[/color]
            > type[color=green]
            > > in a url and have the code stop before displaying stuff to the
            > > browser. Then, step through each individual piece of code, etc,[/color]
            > whilst[color=green]
            > > having the output mirrored to either another file or the debugger
            > > screen...
            > >
            > > Anyway, I tried dbg, but it doesn’t seem to support this,[/color]
            > as far as[color=green]
            > > I’m aware (ie: you need to set the url, etc inside of the[/color]
            > debugger,[color=green]
            > > and I’m still trying to figure out arguments/etc with it.).[/color]
            > I’m not[color=green]
            > > too hot on a graphical debugger - I’d rather be able to[/color]
            > stick with[color=green]
            > > emacs.
            > >
            > > Any suggestions would be greatly appreciated.
            > >
            > > thanks again,
            > >
            > > jon[/color]
            >
            > I’m not aware of any debugger like perl’s built-in command
            > line debugger
            > that comes with the base php. Zend makes a Windows/MacOS
            > X/Linux-based
            > IDE with a debugger (http://www.zend.org) for 9. There’s a
            > free eval
            > available if you want to try it out.
            >
            > If you’re looking for something like perl or gdb’s
            > debugger, you’re
            > probably SOL.
            >[/color]

            I use Zend to debug scripts run from command line (mostly for exec as
            crontab). It works fine. One issue I have found is that I don’t know
            how to feed CLI arguments to the interpretor, but that is easy to work
            around (by just detecting that the debugger is running, and setting
            the parameters in the script accordingly).

            --
            http://www.dbForumz.com/ This article was posted by author's request
            Articles individually checked for conformance to usenet standards
            Topic URL: http://www.dbForumz.com/PHP-command-...ict147576.html
            Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=494526

            Comment

            • steve

              #7
              Re: Re: best command line debugger for php

              "user235" wrote:[color=blue]
              > In article <f05e664d.04090 80042.4dfe908@p osting.google.c om>,
              > ttyp32000@yahoo .com (jonathan) wrote:
              >[color=green]
              > > everyone,
              > >
              > > I’d like to be able to debug php scripts on the command[/color]
              > line, going[color=green]
              > > through the
              > > browser. In other words, set up the debugger to listen and then[/color]
              > type[color=green]
              > > in a url and have the code stop before displaying stuff to the
              > > browser. Then, step through each individual piece of code, etc,[/color]
              > whilst[color=green]
              > > having the output mirrored to either another file or the debugger
              > > screen...
              > >
              > > Anyway, I tried dbg, but it doesn’t seem to support this,[/color]
              > as far as[color=green]
              > > I’m aware (ie: you need to set the url, etc inside of the[/color]
              > debugger,[color=green]
              > > and I’m still trying to figure out arguments/etc with it.).[/color]
              > I’m not[color=green]
              > > too hot on a graphical debugger - I’d rather be able to[/color]
              > stick with[color=green]
              > > emacs.
              > >
              > > Any suggestions would be greatly appreciated.
              > >
              > > thanks again,
              > >
              > > jon[/color]
              >
              > I’m not aware of any debugger like perl’s built-in command
              > line debugger
              > that comes with the base php. Zend makes a Windows/MacOS
              > X/Linux-based
              > IDE with a debugger (http://www.zend.org) for 9. There’s a
              > free eval
              > available if you want to try it out.
              >
              > If you’re looking for something like perl or gdb’s
              > debugger, you’re
              > probably SOL.
              >[/color]

              I use Zend to debug scripts run from command line (mostly for exec as
              crontab). It works fine. One issue I have found is that I don’t know
              how to feed CLI arguments to the interpretor, but that is easy to work
              around (by just detecting that the debugger is running, and setting
              the parameters in the script accordingly).

              --
              http://www.dbForumz.com/ This article was posted by author's request
              Articles individually checked for conformance to usenet standards
              Topic URL: http://www.dbForumz.com/PHP-command-...ict147576.html
              Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=494525

              Comment

              Working...