views:

613

answers:

14

I've been giving a talk recently on a plethora of Open Source (some are borderline open-source, I'll admit) debugging tools and the audiences have been making great additions to my list.

I'd like to gather the knowledge (and give credit) to the oft-brilliant StackOverflow crowd on this same question.

There are no WebService/Java/.Net/HTML/Perl constraints of programming languages to this question. So far, I've been pontificating about:

  1. fs_usage for finding what keeps writing to disk so much
  2. lsof for debugging what ports or files are open
  3. tcpdump, wireshark, eavesdrop for looking at your network traffic (malformed data?)
  4. firebug for debugging css, javascript, and page loading issues
  5. SoapUI, poster, and for troubleshooting SOAP and RESTful web services
  6. Eclipse Memory Analyzer and VisualVM for Java memory usage and GC issues
  7. BTrace for instrumenting Java code already deployed to production servers
  8. curl for looking at raw HTML, sans browser redirects, and test-calling web services
  9. JMeter for load testing webapps and other supported components that fail under stress

What Open Source tools can you add to the list?

+5  A: 

For the gcc crowd, there's gdb and gprof. I've gotten a lot done with those two.

David Thornley
My hat's off to, 'ya.
dmckee
Is there any other C debugger for Linux/Unix other than gdb? Gdb frustrates me to no end after having used ntsd... I would love to find ntsd's equivalent.
jeffamaphone
+2  A: 

xdebug for PHP can be a godsend.

David
+5  A: 

gdb is the king of course, and valgrind has its fans.

For a nice open source GUI wrapper around gdb, see DDD. And yet another gdb front end - Insight.

anon
+1  A: 

For the java programmers out there why not try the Omniscient Debugger? It allows debugging in time (think time-travel) which is very handy.

Sebastian Krog
I had a copy of RetroVue once upon a time. It did the same thing, but it was back in the days of Java 1.2 so it was very slow... too slow to be used to its full potential.
CoverosGene
+1  A: 

I wouldn't call it a favorite, but when you need it netcat is quite nice to be able to script network traffic.

Michael Burr
A: 
printf("%s - %d: %d", __FILE__, __LINE__, variable );
qDebug() << variable;

;-)

elcuco
+2  A: 

printf()

Martin Beckett
Either the min-length check isn't done when editing or the formatting crossed the line ;-)
Joachim Sauer
A: 

As a C lover I like gdb.

alucardni
+1  A: 

I'll join the C crowd:

gdb, valgrind, gprof.

Edit: I'll join the Java crowd out there as well.

Eclipse debugging tools, firebug,

Tom
firebug? It's nice, but has nothing to do with Java. It's a JavaScript debugger.
Joachim Sauer
yeah, i know, but i didnt feel like putting "ok, and i'll even join the JS crowd ". I'll be more carefull next time.
Tom
nevermind, I'm just alergic to the entire mix-up-Java-and-JavaScript-problem ;-)
Joachim Sauer
+4  A: 

Firebug for anything related to the web and Eclipse Debugger for stepping through java code. jUnit and Mockito are probably used most in my daily work, though not limited to debugging.

Magnus
Can you hyperlink your tool references in your answer? It really increases the value for everyone. Thanks for the contributions. If you have any more in the Java space, fire away!
Matthew McCullough
@Matthew Sorry, didn't think of that.
Magnus
+1  A: 

LLVM Clang Static Analysis. It's sweet.

John Fricker
+2  A: 

python logging module.

firebug.

liveHTTP headers in firefox.

Safari webinspector.

When it comes to debugging web applications I never use stuff that adds debugging/logging info to the server's output.

I also have my own wsgi middleware I use for debugging web apps. It dumps whole http responses in a database so It can be accessed numerous times. It can be configured to just dump stuff with 500 status code etc. This way I don't have to resend post requests with firebug when I'm debugging ajax stuff, it's also much easier to read this way.

Vasil
Can you add hyperlinks to the liveHTTP and webinspector pages? Thanks for the idea contributions!
Matthew McCullough
Added. The webinspector is installed with safari, you just have to activate it. But I'm not really sure about safari on windows.
Vasil
+1 to liveHTTP headers. That's what I've been using to track HTTP request data in the browser.
Eric Wendelin
+1  A: 
function readVar($var)
{
    echo '<pre>';
    var_dump($var);
    echo '</pre>';
}

I use this about one hundred times a day.

On the client side, it's Firebug, or the primal classic:

<script>
alert('hello1');
.......//borked code stops execution here?
alert('hello2');
.......//hmmm we shall see
</script>

:)

karim79
+3  A: 

VisualVM might not be the most powerful tool in the Java-world, but it's got a very nice ease-of-use-to-power ratio.

Joachim Sauer