Commenting

One of the oldest debugging techniques is to comment out code.

  • Locate where you think the problem is occurring in your program.

  • Put comment characters in front of or around the statements that might be causing the problem.

  • Recompile and reexecute the program.

  • Determine if your program is now working correctly.

  • Repeat the process until you've identified the statement causing the error.


Prev -- Up -- Next