NYCPHP Meetup

NYPHP.org

[nycphp-talk] Turning on all warnings, error reporting, collecting debugging info ...

Ben Sgro ben at projectskyline.com
Mon Aug 18 17:28:42 EDT 2008


I can't comment on vi + xdebug (im an emacs guys) but w/komodo & xdebug 
- what is so "impressive"
is the ability for me to step through my code.

Say I have a class that does a few SOAP requests - My client hits my 
service and all they get back is a 500. Great.
How would I go about debugging this w/xdebug.

Simple, I'd set a breakpoint at the start of said method / class / 
function and step through it. I can examine
any and all variables at any point, step into or out of any 
function/method as well.

As I'm stepping through the code, I might notice where it errors out. 
Maybe it error'ed out because a variable
value it was depending on wasn't getting set, or was getting initialized 
improperly.

I can then step through the code in the debugger again, focusing on 
where this variable gets assigned its value.

I come from a c background, both on windows and linux, and the one thing 
I really liked was visual studios' IDE.
I can't imagine trying to write *enterprise* level applications without 
an IDE. PHP or any language.

Its truly one of my most powerful tools as a developer.

Also, take this scenario - Imagine you're handed a new application to 
continue development on. Looking through the code is
my first step, my second would be to fire up xdebug and step through the 
code. What better way to see the previous' developers
intentions than by watching the code in real time.

- Ben

Michael B Allen wrote:
> On Mon, Aug 18, 2008 at 10:40 AM, Mitch Pirtle <mitch.pirtle at gmail.com> wrote:
>   
>> On Sun, Aug 17, 2008 at 4:55 PM, Michael B Allen <ioplex at gmail.com> wrote:
>>     
>>> I think I had xdebug enabled on my old machine but I did not notice
>>> much of a difference aside from the appearance of stack traces.
>>>       
>> Xdebug really shines when you are using an IDE that is trapping those
>> errors like eclipse or Zend. I had no idea what all the buzz was about
>> regarding xdebug until I saw a coworker working in eclipse with PDT
>> and xdebug setup. Pretty impressive.
>>     
>
> I use vim with all the bells and whistles turned off so it doesn't
> sound like xdebug is going to do much for me.
>
> But I'm curious - can you give me an example of exactly what is
> "impressive" about the said setup?
>
> I just want to know what I'm missing exactly. If it's really that
> great I suppose I could use vim for speedy typing and eclipse for
> everything else.
>
> Mike
>
>   



More information about the talk mailing list