C
C
Cord2012-05-21 15:43:02
PHP
Cord, 2012-05-21 15:43:02

What is the best PHP debugger?

Hey Habr.
We write our own debugger for the framework. Tracer, debbager, etc.

We want to see samples of ideal debuggers in already written frameworks. Advise where is the best place to debug? You can not only PHP. C ++, Java will go, of course.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
I
Ivan Shalganov, 2012-05-21
@Aco

1. xdebug + IDE = excellent step-by-step debugging
2. xdebug + profiler + (kcachegrind or wincachegrind) = analysis of performance glitches
3. memtrack - search for memory leaks in crons/daemons
4. DTrace + PHP = analysis of "how it work" and each sneeze scripts
5. strace -p PID - analysis of syscall - sneeze scripts.
6. APD is a weak competitor to xdebug, but it has memtrack capabilities. Doesn't integrate well with IDE, but has console interfaces (see usage).
7. wireshark to analyze network traffic, protocols, etc. (tcpdump + ssh pipe + wireshark = spying traffic from a combat server)
8. you can take runkit and replace php functions with your own (or make a proxy) to analyze passing data / generate exceptional data / block data changes.
9. Centralized syslog will allow you to respond to problems in time.
Of course, the part is off topic, but I can't be stopped!

E
Ents, 2012-05-21
@Ents

IMHO debugging is not a feature of the framework. You're digging in the wrong direction
. How are you going to implement breakpoint for php using php methods?

E
eaa, 2012-05-21
@eaa

From experience it turned out that the most productive is stupid logging. Competent logs. SQL is separate. Dumps of input data and dumps of results. And in case of gross errors - call stack. And that's it. This was the only way to catch errors from customers when something happened to him, and he discovered it a week later and raised a cry - there is only one way out - we go by telnet to his host and start reading the logs. Lots of logs. Entertainment may not be for one day / week, but as a result, restoring everything that happened on his car, we get the place where the error was and what really happened.
What would you like ... probably - so that you can shove these logs into some kind of play-back machine and clearly see what happened, and not read footcloths with bookmarks-numbers, but look at beautiful screens, where a string of changing numbers of variables of particular interest runs in front of your eyes , flags, method calls, etc., and it would be beautifully formatted so that you can turn it off and not see what you are not interested in at the moment, see everything with the right level of detail.

R
rPman, 2012-05-21
@rPman

xdebug?
phpshtorm, for example, supports
ps to configure on windows xdebug - it will be problematic, you will find compatible versions of php and xdebug in ready-made binary form, although I seriously did not dig.

V
Valery Selitsky, 2012-05-22
@WaveCut

For ZF we use this: ZFDebug toolbar

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question