What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 131 Stack Exchange communities.

I'm sure this is a duplicate, but I can't find it.

What seems to be an ever-increasing volume of questions consist of a Great Wall Of Code and a more or less plaintive request for assistance in explaining a null pointer exception or array index out of bounds. These questions attract some more or less snarky comments, followed by more or less detailed attempts at ESP and other forms of blind man's bluff.

An answer of the form, "To solve your problem, please acquire one of the following debuggers and learn to use it," nonetheless, still doesn't not feel like an answer. In fact, when I tried it as an experiment today, it attracted two downvotes in short order.

Still, if the goal of all of this is to attract experts to answer questions, experts do not debug walls of code. Experts teach people to use the right tool for the job.

An extreme alternative would be a close reason, 'needs a debugger.' More possible would be a collective attempt to legitimize debugger pointers as legitimate answers.

Here's an example where debugging instructions didn't get downvoted but also don't seem to have made any impression.

share|improve this question
    
1  
Amen to that, brotha! –  Gabe Apr 11 '11 at 3:45
5  
I would rather explain to people that unit testing small sections of code independently is a good way to isolate problems, to be honest. There's a place for debuggers, but I'd almost always rather use a unit test. –  Jon Skeet Apr 11 '11 at 6:11
3  
@JonSkeet Most of the times just simple thinking and common sense would be enough but that brings us back to my way to high expectations of humanity. –  Octavian Damiean Apr 11 '11 at 7:58
    
I wish I could vote this up every time this thought occurs to me. –  PengOne Jun 7 '11 at 22:19
    
use the debugger –  Sam I am Mar 12 '13 at 19:08

1 Answer 1

up vote 0 down vote accepted

It's possible to explain to someone that the problem that they are asking involves the use of a debugger but without coming off as arrogant.

My suggestion is to explain to the user that you will need to go through the same process they will to solve the problem, and that learning to use a specific debugger may be helpful.

However, this should be a comment. If you aren't going to actually answer the question, then don't. On the other hand, if you do use a debugger to find the solution for the question asker, then it would be appropriate to explain how you found the answer so that next time the question asker can use that tool to solve his or her problem.

Additionally, you should consider that perhaps the problem goes deeper than you realize and that a debugger alone may not solve the problem. It's sometimes easy for us to look at a problem on the surface and dismiss it as trivial, that is, until we dig in ourselves and realize the full extent of the problem.

In summary, my suggestion is to give everyone the benefit of the doubt, answer the question, and also explain that you used debugger X to find the solution. Finally, include a link to the debugger with a tutorial. This will also help ensure you don't get downvoted for other community members misinterpreting your intentions.

share|improve this answer
1  
I don't see any reason that "You need to use a debugger on this code. Specifically, check x, y, and z." couldn't be an answer rather than a comment. It's an actionable suggestion; SO answers are for sharing knowledge and giving advice, not doing other people's work for them. If the only possible "real" answer is to run and debug the asker's code on their behalf, then I believe that it wasn't a real question. If the question seems trivial, then the asker should explain better why it isn't. –  Josh Caswell Apr 11 '11 at 6:44
    
There are only two possible situations where a problem goes deeper than on the first sight. a) The asker doesn't really know what he wants thus expects his code to do things which is simply won't and b) he is working with concurrency where sometimes it is not that easy to spot the bug. –  Octavian Damiean Apr 11 '11 at 8:03
    
An asker who does not known how to use a debugger (or read a stack-trace) has demonstrated that their are either not a professional programmer, or they have no enthusiasm about learning the basics. So such questions should be closed as off-topic, rather than encouraged with an answer. –  Raedwald Jan 8 at 14:20
    
@Raedwald - or this could be a new programmer struggling to learn and who doesn't have a good mentor to show them the ropes. I'm sure we all can think of a tool or technology someone just happened to mention in passing that we then feverishly dug into. Had they not mentioned X, we wouldn't have learned about it because we simply wouldn't know it existed. Many tutorials out there don't do a good job of mentioning debuggers. Not suggesting the questions shouldn't be closed, just wanted to clarify that again, we should give people the benefit of the doubt and be nice. –  jmort253 Jan 8 at 17:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .