PHP debugging

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

    #16
    Re: PHP debugging

    On Tue, 31 Aug 2004 11:07:22 +0100, Rob Allen <robng@the-allens.net>
    wrote:
    [color=blue]
    >In message <9KQYc.27702$Es 2.10186114@news 4.srv.hcvlny.cv .net>, dbmethods
    ><dbmethods@nos pam.com> writes[color=green]
    >>Which IDE you would recommend? Perfer run on Linux.[/color]
    >
    >Zend Studio.
    >
    >Useful features (as in most IDEs):
    >* code completion - tooltip includes phpdoc info about function.
    >* debugger.
    >* press F1 to get help on a php function.
    >* "go to source of this function" (i.e ctags ).
    >* grouping of files into "projects".
    >* find in project.
    >
    >Things I dislike:
    >* no "strip trailing whitespace" on save.
    >* ctrl+tab for switching open files doesn't use a "stack" of tabs.
    >* no keyboard shortcut for "open file under cursor".
    >* no keyboard shortcut for "go to source of this function".
    >* tab line for open files becomes multi-line if too many files are
    >opened.
    >
    >
    >It's free for personal use and not especially expensive if you are
    >making money from your PHP coding :)[/color]


    I recently tried Zend and have since gone back to UEdit on windoze
    (Anjuta or Vim on *nix depending on current environment).

    Zend has a couple of useful features.. remote file tree for one is very
    useful and missing in UEdit.

    I develop on a remote box so need a remote debugger for Zend which
    AFAIK, isn't a free option. Sure, as I'd be using it for a commercial
    purpose too, I could pay for it, but...

    Zend IDE has the slowest, cludgiest editor I've ever used; it's purely
    horrid! I guess Java has it's place like everything else, an IDE such as
    Zend IMO is _not_ a place for it.. it's _WAY_ too slow.

    There's no anti-aliasing of fonts either for the editor, which while not
    essential, I think makes the code slightly easier on the eyes to read.

    As using Zend for me wouldn't just come under "personal use", IMO, it
    has too many cons and not enough pros to warrant the price asked. Had
    this been written properly in C / C++, it might be a different story.


    </£0.02>



    Regards,

    Ian

    --
    Ian.H
    digiServ Network
    London, UK

    Comment

    • Daniel Tryba

      #17
      Re: PHP debugging

      Ian.H <ian@windozedig iserv.net> wrote:[color=blue]
      > Zend IDE has the slowest, cludgiest editor I've ever used; it's purely
      > horrid! I guess Java has it's place like everything else, an IDE such as
      > Zend IMO is _not_ a place for it.. it's _WAY_ too slow.
      >
      > There's no anti-aliasing of fonts either for the editor, which while not
      > essential, I think makes the code slightly easier on the eyes to read.
      >
      > As using Zend for me wouldn't just come under "personal use", IMO, it
      > has too many cons and not enough pros to warrant the price asked. Had
      > this been written properly in C / C++, it might be a different story.[/color]

      This has nothing to do with the language it was written in. Java can be
      a perfect solution for an environemnt like Zend Studio. Just take a look
      eclipse to get an idea of how it could be done better.

      --

      Daniel Tryba

      Comment

      • Tim Tyler

        #18
        Re: PHP debugging

        Tony Marston <tony@nospam.de mon.co.uk> wrote or quoted:
        [color=blue]
        > What's wrong with PHP error messages? They tell you the script name, the
        > line number, what was expected and what was found. What more do you want?[/color]

        Mostly the things I already mentioned: human readability and stack back-traces.

        Having the parser being able to figure out that mismatched braces and
        things like function definitons within functions are not normal - and
        likely indicate the source of the error - might help as well.
        [color=blue]
        > If you are not already using an IDE with an integrated debugger then you are
        > a junior programmer indeed. Stop whingeing and start using proper tools.[/color]

        FWIW, I've been writing programs commercially for the last 22 years.
        --
        __________
        |im |yler http://timtyler.org/ tim@tt1lock.org Remove lock to reply.

        Comment

        • Andrew DeFaria

          #19
          Re: PHP debugging

          Tony Marston wrote:
          [color=blue][color=green]
          >> Nonsense. All you need is a good editor and a good debugger! They
          >> need not co-exist in the same window, they just need to be available
          >> - and good.[/color]
          >
          > I prefer an IDE with an integrated debugger.[/color]

          So then you admit that it's a preference not a requirement.
          [color=blue]
          > A primitive editor and a separate debugger just slow me down and lower
          > my productivity rate. That is not good..[/color]

          Wait a second! You're changing me words. Where did I say "primitive" ? I
          didn't. I said a good editor not a primitive one. I can as easily say a
          primitive editor in the IDE would slow me down too.
          [color=blue][color=green]
          >> It is not really that difficult to edit in your editor and drop into
          >> a command window to debug or a browser or whatever. Indeed it keeps
          >> you in touch with how all of this works together. IDEs cloud that issue[/color]
          >
          > Cloud the issue how exactly?[/color]

          It obscures the details of what's going on.
          [color=blue][color=green]
          >> and often people do not know how to do anything except with their
          >> particular IDE with it's particular extensions.[/color]
          >
          > So what?[/color]

          The "every problem is a nail 'cause all I gots a hammer" syndrome is not
          what I would consider good.
          [color=blue]
          > A good programmer should be able to switch from one IDE to another
          > relatively easily.[/color]

          When you "throw all your eggs in one basket" and "provide all this
          functionality in a well integrated package" you have made it so that in
          order to be good at a particular IDE one must invest a lot of time
          studying it, getting to know it and getting proficient at it. So when
          the time comes to throw away that IDE and learn the new one reluctance
          will kick in - it's human nature.
          [color=blue][color=green]
          >> True masters use their tools and apply them to different problems.
          >> There is saying about this, "If all you have is a hammer then all of
          >> your problems look like nails!". But a true master will use different
          >> tools,
          >> each good at what it does, in ingenious ways to solve way more
          >> problems than the hammer master! And, he'll know why they worked or
          >> why the particular tool is not suited for the task at hand.[/color]
          >
          > Once you have used an IDE with an integrated debugger you will realise
          > that switching back to a simple text editor and a command line
          > debugger is a retrograde step.[/color]

          Maybe for you but not for me. I've used both. I prefer using a set of
          good tools rather than a good kitchen sink. With a good kitchen sink I
          can work on all kinds of plumbing and water problems (to stretch the
          analogy) but with my good set of tools I can fix the sink, shower *and*
          work on the car in the garage. Otherwise I need to learn the Automotive
          2005 IDE to work on the car! :-)

          YMMV
          [color=blue]
          > They may both get the job done, but one is faster and therefore better.[/color]

          Not really. The IDE is oriented to a certain discipline, a certain way
          of doing things. Using it to get a different job done doesn't work well.
          The programmer has two options at this point: Get another IDE more
          suited for the task and spend the time learning it (not a very appealing
          choice) or either force fit his current IDE to the task at hand or
          change the task at hand to fit his IDE. (also not a good choice).
          [color=blue]
          > I rest my case.[/color]

          Hardly.

          --
          Think "honk" if you're telepathic.

          Comment

          • Rob Allen

            #20
            Re: PHP debugging

            In message <ifl8j0hjq72tub u1qmgr210fbdiiq e822f@4ax.com>, Ian. H
            <ian@WINDOZEdig iserv.net> writes[color=blue]
            >I recently tried Zend and have since gone back to UEdit on windoze
            >(Anjuta or Vim on *nix depending on current environment).
            >[/color]

            Yeah, I use UEdit for 90% of the stuff I do.
            [color=blue]
            >Zend IDE has the slowest, cludgiest editor I've ever used; it's purely
            >horrid! I guess Java has it's place like everything else, an IDE such
            >as Zend IMO is _not_ a place for it.. it's _WAY_ too slow.[/color]

            I find it fast enough on my Athon 1800XP. Compared to UEdit though, I
            find the editor simplistic. The code completion on function names is
            nice; the non-stack-based ctrl+tab drives me up the wall!

            I didn't buy the Zend license though (company did) so price wasn't an
            issue.

            --
            Rob...

            Comment

            • Rob Allen

              #21
              Re: PHP debugging

              In message <916b9$4134977a $43661972$27970 @msgid.meganews servers.com>,
              Andrew DeFaria <Andrew@DeFaria .com> writes[color=blue]
              >When you "throw all your eggs in one basket" and "provide all this
              >functionalit y in a well integrated package" you have made it so that in
              >order to be good at a particular IDE one must invest a lot of time
              >studying it, getting to know it and getting proficient at it. So when
              >the time comes to throw away that IDE and learn the new one reluctance
              >will kick in - it's human nature[/color]

              This also applies to editors :)

              incidentally, can someone point me at a stand-alone PHP debugger for use
              on Windows, with the ability to step through code, view watches etc?

              --
              Rob...

              Comment

              • Andrew DeFaria

                #22
                Re: PHP debugging

                Rob Allen wrote:
                [color=blue]
                > In message <916b9$4134977a $43661972$27970 @msgid.meganews servers.com>,
                > Andrew DeFaria <Andrew@DeFaria .com> writes
                >[color=green]
                >> When you "throw all your eggs in one basket" and "provide all this
                >> functionality in a well integrated package" you have made it so that
                >> in order to be good at a particular IDE one must invest a lot of time
                >> studying it, getting to know it and getting proficient at it. So when
                >> the time comes to throw away that IDE and learn the new one
                >> reluctance will kick in - it's human nature[/color]
                >
                > This also applies to editors :)[/color]

                Not really. An editor has one job - to produce a file - in the context
                of programming, to produce a source file. It applies to editors as much
                as it applies to hammers. A good hammer will take you far and solve
                most, if not all of your hammering needs. Sure there are also special
                purpose hammers but by and large a good hammer is all you need. Same
                with editors, when the focus is editing a file. Ditto with a good
                debugger. As has been said before with an IDE you can get a good editor
                and a crappy debugger or a good debugger and a crappy editor. Why not
                simply get good tools and put them into a toolbox? Let me ask you a
                question: Do you actually own a hammer/screwdriver/drill/saw combo? No!
                So why do you want a similar thing in an IDE?
                --
                All women are idiots... and I married their queen.

                Comment

                • Tony Marston

                  #23
                  Re: PHP debugging


                  "Daniel Tryba" <news_comp.lang .php@canopus.nl > wrote in message
                  news:ch1j1f$jrv $2@news.tue.nl. ..[color=blue]
                  > Tony Marston <tony@nospam.de mon.co.uk> wrote:[color=green][color=darkred]
                  >>> Nonsense. All you need is a good editor and a good debugger! They need
                  >>> not
                  >>> co-exist in the same window, they just need to be available - and good.[/color]
                  >>
                  >> I prefer an IDE with an integrated debugger. A primitive editor and a
                  >> separate debugger just slow me down and lower my productivity rate. That
                  >> is
                  >> not good..[/color]
                  >
                  > slow _you_ down. I have yet to find an IDE that has an editor as
                  > powerful as vim. But then again there are people who hate vi(m).[/color]

                  And I am one of them. I have used many editors over many years, but the
                  first time I tried to use VI I was totally disgusted with it. It was not
                  intuitive, it was not user-friendly, so I went back to my previous editor.
                  [color=blue][color=green]
                  >> Once you have used an IDE with an integrated debugger you will realise
                  >> that
                  >> switching back to a simple text editor and a command line debugger is a
                  >> retrograde step. They may both get the job done, but one is faster and
                  >> therefore better.[/color]
                  >
                  > I tried Zend studio once, it' s debugger is great. The editor was IMHO
                  > horrible. As long as there are no problems in code/server, a "simple
                  > editor" is faster,[/color]

                  A "simple" editor is not faster than an IDE. I have worked with teams of
                  programmers for many years and I have witnessed the difference in
                  productivity.
                  [color=blue]
                  > in the case of bugs in complex datasctructures a
                  > decent debugger is needed. But there is absolutly no need to have them
                  > integrated.[/color]

                  That is your preference. My prefernce is different.
                  [color=blue]
                  > But enlighten me, what IDE (for PHP) should I take a look at?[/color]

                  Whichever one takes your fancy. There are plenty out there. Just do a search
                  for "php ide" on google.

                  --
                  Tony Marston

                  This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL




                  Comment

                  • Tony Marston

                    #24
                    Re: PHP debugging


                    "Tim Tyler" <tim@tt1lock.or g> wrote in message news:I3BF42.8yD @bath.ac.uk...[color=blue]
                    > Tony Marston <tony@nospam.de mon.co.uk> wrote or quoted:
                    >[color=green]
                    >> What's wrong with PHP error messages? They tell you the script name, the
                    >> line number, what was expected and what was found. What more do you want?[/color]
                    >
                    > Mostly the things I already mentioned: human readability and stack
                    > back-traces.[/color]

                    You do not get get such things from parsers or compilers. That is what a
                    debugger is for.
                    [color=blue]
                    > Having the parser being able to figure out that mismatched braces and
                    > things like function definitons within functions are not normal - and
                    > likely indicate the source of the error - might help as well.
                    >[color=green]
                    >> If you are not already using an IDE with an integrated debugger then you
                    >> are
                    >> a junior programmer indeed. Stop whingeing and start using proper tools.[/color]
                    >
                    > FWIW, I've been writing programs commercially for the last 22 years.[/color]

                    I have been writing programs commercially for nearly 30 years. I remember
                    the same level of primitive error messages that were produced by the COBOL
                    compiler. Learning how to deal with those messages was part of being a
                    programmer. And we had to do it without any sort of debugger.

                    --
                    Tony Marston

                    This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL




                    Comment

                    • Tim Tyler

                      #25
                      Re: PHP debugging

                      Tony Marston <tony@nospam.de mon.co.uk> wrote or quoted:[color=blue]
                      > "Tim Tyler" <tim@tt1lock.or g> wrote in message news:I3BF42.8yD @bath.ac.uk...[color=green]
                      > > Tony Marston <tony@nospam.de mon.co.uk> wrote or quoted:[/color][/color]
                      [color=blue][color=green][color=darkred]
                      > >> What's wrong with PHP error messages? They tell you the script name, the
                      > >> line number, what was expected and what was found. What more do you want?[/color]
                      > >
                      > > Mostly the things I already mentioned: human readability and stack
                      > > back-traces.[/color]
                      >
                      > You do not get get such things from parsers or compilers. That is what a
                      > debugger is for.[/color]

                      Compilers are normally *supposed* to produce human-readable error messages.

                      Stack backtraces have been built into runtimes for donkey's years.

                      Consider Java for instance: stack back-traces by default since 1995.

                      At least there are some stack back-trace facilities in PHP - they
                      just aren't turned on by default - and to activate them you have
                      to write your own error handler.
                      [color=blue][color=green]
                      > > Having the parser being able to figure out that mismatched braces and
                      > > things like function definitons within functions are not normal - and
                      > > likely indicate the source of the error - might help as well.
                      > >[color=darkred]
                      > >> If you are not already using an IDE with an integrated debugger
                      > >> then you are a junior programmer indeed. Stop whingeing and start
                      > >> using proper tools.[/color]
                      > >
                      > > FWIW, I've been writing programs commercially for the last 22 years.[/color]
                      >
                      > I have been writing programs commercially for nearly 30 years. I remember
                      > the same level of primitive error messages that were produced by the COBOL
                      > compiler. Learning how to deal with those messages was part of being a
                      > programmer. And we had to do it without any sort of debugger.[/color]

                      Low levels of human readability in error messages is a problem
                      that is likely to drive beginners away from the language.
                      --
                      __________
                      |im |yler http://timtyler.org/ tim@tt1lock.org Remove lock to reply.

                      Comment

                      • Virgil Green

                        #26
                        Re: PHP debugging

                        "Tony Marston" <tony@NOSPAM.de mon.co.uk> wrote in message
                        news:cgvog5$ri3 $1$830fa795@new s.demon.co.uk.. .[color=blue]
                        >
                        > "Colin McKinnon" <colin.deleteth is@andthis.mms3 .com> wrote in message
                        > news:cguvb7$ho9 $1$8302bc10@new s.demon.co.uk.. .[color=green]
                        > > Tony Marston wrote:
                        > >[color=darkred]
                        > >>
                        > >> If you are not already using an IDE with an integrated debugger then[/color][/color][/color]
                        you[color=blue][color=green][color=darkred]
                        > >> are a junior programmer indeed. Stop whingeing and start using proper
                        > >> tools.
                        > >>[/color]
                        > >
                        > > So....if I go and install an IDE I'll be a better programmer ;).[/color]
                        >
                        > You will be more productive if you use an IDE which includes a debugger
                        > instead of a simple text editor which does not. This will help you to[/color]
                        track[color=blue]
                        > down and cure bugs faster which WILL make you a better programmer.[/color]

                        More productive? Probably. Better programmer? Only if you were inclined to
                        become a better programmer without the IDE.
                        [color=blue]
                        > If you don't use the right tools for the job then you will always be an
                        > amateur code-monkey.[/color]

                        Hardly. Tools are for convenience and productivity. The term "right tools"
                        is highly subjective and could very well preclude the use of any IDE.

                        - Virgil


                        Comment

                        • Tony Marston

                          #27
                          Re: PHP debugging


                          "Virgil Green" <vjg@DESPAMobsy dian.com> wrote in message
                          news:CZ2Zc.7613 $Th.4809@newssv r23.news.prodig y.com...[color=blue]
                          > "Tony Marston" <tony@NOSPAM.de mon.co.uk> wrote in message
                          > news:cgvog5$ri3 $1$830fa795@new s.demon.co.uk.. .[color=green]
                          >>
                          >> "Colin McKinnon" <colin.deleteth is@andthis.mms3 .com> wrote in message
                          >> news:cguvb7$ho9 $1$8302bc10@new s.demon.co.uk.. .[color=darkred]
                          >> > Tony Marston wrote:
                          >> >
                          >> >>
                          >> >> If you are not already using an IDE with an integrated debugger then[/color][/color]
                          > you[color=green][color=darkred]
                          >> >> are a junior programmer indeed. Stop whingeing and start using proper
                          >> >> tools.
                          >> >>
                          >> >
                          >> > So....if I go and install an IDE I'll be a better programmer ;).[/color]
                          >>
                          >> You will be more productive if you use an IDE which includes a debugger
                          >> instead of a simple text editor which does not. This will help you to[/color]
                          > track[color=green]
                          >> down and cure bugs faster which WILL make you a better programmer.[/color]
                          >
                          > More productive? Probably. Better programmer? Only if you were inclined to
                          > become a better programmer without the IDE.[/color]

                          Being a "better programmer" is supposed to encompass both accuracy and
                          speed. Compared to an IDE a simple text editor is too slow. If being able to
                          use a primitive tool even though it decreases your productivity is *your*
                          measure of being a better programmer then I suppose back in the days of
                          punched cards you would have been one of those who stayed with a primitive
                          non-interpretive hand punch while the rest of us were using VIPs
                          (Verifier-Interpreter-Punch).
                          [color=blue][color=green]
                          >> If you don't use the right tools for the job then you will always be an
                          >> amateur code-monkey.[/color]
                          >
                          > Hardly. Tools are for convenience and productivity. The term "right tools"
                          > is highly subjective and could very well preclude the use of any IDE.[/color]

                          Any IDE is better than no IDE. If you can't find one you like then try
                          another.

                          --
                          Tony Marston

                          This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL




                          Comment

                          • Michael Fesser

                            #28
                            Re: PHP debugging

                            .oO(Tony Marston)
                            [color=blue]
                            >"Daniel Tryba" <news_comp.lang .php@canopus.nl > wrote
                            >[color=green]
                            >> in the case of bugs in complex datasctructures a
                            >> decent debugger is needed. But there is absolutly no need to have them
                            >> integrated.[/color]
                            >
                            >That is your preference. My prefernce is different.[/color]

                            Exactly, it's a preference. So please don't call people with other
                            preferences "junior programmer" or "amateur code-monkey".

                            Micha

                            Comment

                            • Andrew DeFaria

                              #29
                              Re: PHP debugging

                              Tony Marston wrote:
                              [color=blue]
                              > Any IDE is better than no IDE. If you can't find one you like then try
                              > another.[/color]

                              My "IDE" is Windows (or X) and the various applications I use (Xemacs,
                              Cygwin, Vim, etc) are the MDI pieces of my "IDE".

                              (See sometimes you just have to look at things in a different perspective).

                              Comment

                              • Default User

                                #30
                                Re: PHP debugging

                                Virgil Green wrote:
                                [color=blue]
                                > "Tony Marston" <tony@NOSPAM.de mon.co.uk> wrote in message
                                > news:cgvog5$ri3 $1$830fa795@new s.demon.co.uk.. .[/color]
                                [color=blue][color=green]
                                > > You will be more productive if you use an IDE which includes a
                                > > debugger instead of a simple text editor which does not. This will
                                > > help you to[/color]
                                > track[color=green]
                                > > down and cure bugs faster which WILL make you a better programmer.[/color]
                                >
                                > More productive? Probably. Better programmer? Only if you were
                                > inclined to become a better programmer without the IDE.[/color]

                                I'm not really that convinced that IDEs make you that much more
                                productive. I use one at work for development (Visual C++), but at home
                                I use standalone tools. I do my C compiling on gcc/cygwin and PHP under
                                the EasyPHP evironment.

                                For PHP I don't even bother with a debugger, the sort of problems I
                                normally have are different than the ones from C development. I find
                                output statements to be about as effective in troubleshooting as would
                                stepping through.
                                [color=blue][color=green]
                                > > If you don't use the right tools for the job then you will always
                                > > be an amateur code-monkey.[/color]
                                >
                                > Hardly. Tools are for convenience and productivity. The term "right
                                > tools" is highly subjective and could very well preclude the use of
                                > any IDE.[/color]

                                Exactly. I've worked in software starting around 1990 or so, and
                                switching to it pretty much full-time about 10 years ago. I'm in
                                software R&D for embedded applications these days.

                                A software developer should be familiar with a variety of tools, but
                                not overly dependent on any one. Makefiles are useful in their place,
                                as are IDE projects. You should know how to use debuggers, also how to
                                debug when you don't have a debugger.



                                Brian

                                Comment

                                Working...