Skip to main content
added 529 characters in body
Source Link
NathanOliver
  • 179.4k
  • 8
  • 109
  • 145

On question where the OP can easily fix the problem using a debugger I tend to leave an auto comment with:

It sounds like you may need to learn how to use a debugger to step through your code. With a good debugger, you can execute your program line by line and see where it is deviating from what you expect. This is an essential tool if you are going to do any programming. Further reading: How to debug small programs

I try not to answer them as learning how to debug code is a very useful skill and can quite helpful. I believe in the old adage

Give a man a fish he eats for a day. Teach a man to fish he eats for life.

The problem with trying to teach the OP how to debug is that SO isn't really the right place to do this. You could include in your answer how you found what was wrong and how to fix it but some people might not like that as it contains a lot of extra information that is not really "useful" except for the OP. Remember answers are not just for the OP but for anyone else with this problem and if you bury the answer a bunch of debugging information it makes getting the answer harder and you may even get down votes for it.

On question where the OP can easily fix the problem using a debugger I tend to leave an auto comment with:

It sounds like you may need to learn how to use a debugger to step through your code. With a good debugger, you can execute your program line by line and see where it is deviating from what you expect. This is an essential tool if you are going to do any programming. Further reading: How to debug small programs

I try not to answer them as learning how to debug code is a very useful skill and can quite helpful. I believe in the old adage

Give a man a fish he eats for a day. Teach a man to fish he eats for life.

On question where the OP can easily fix the problem using a debugger I tend to leave an auto comment with:

It sounds like you may need to learn how to use a debugger to step through your code. With a good debugger, you can execute your program line by line and see where it is deviating from what you expect. This is an essential tool if you are going to do any programming. Further reading: How to debug small programs

I try not to answer them as learning how to debug code is a very useful skill and can quite helpful. I believe in the old adage

Give a man a fish he eats for a day. Teach a man to fish he eats for life.

The problem with trying to teach the OP how to debug is that SO isn't really the right place to do this. You could include in your answer how you found what was wrong and how to fix it but some people might not like that as it contains a lot of extra information that is not really "useful" except for the OP. Remember answers are not just for the OP but for anyone else with this problem and if you bury the answer a bunch of debugging information it makes getting the answer harder and you may even get down votes for it.

Source Link
NathanOliver
  • 179.4k
  • 8
  • 109
  • 145

On question where the OP can easily fix the problem using a debugger I tend to leave an auto comment with:

It sounds like you may need to learn how to use a debugger to step through your code. With a good debugger, you can execute your program line by line and see where it is deviating from what you expect. This is an essential tool if you are going to do any programming. Further reading: How to debug small programs

I try not to answer them as learning how to debug code is a very useful skill and can quite helpful. I believe in the old adage

Give a man a fish he eats for a day. Teach a man to fish he eats for life.