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.


1 Answer 1


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.

  • 2
    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.
    – jscs
    Commented Apr 11, 2011 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. Commented Apr 11, 2011 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
    Commented Jan 8, 2014 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
    Commented Jan 8, 2014 at 17:03

You must log in to answer this question.

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