Java Reference
In-Depth Information
When you write a piece of code, you need to check if it is working fine. You check your
code by running a software application as debugger which is included in most Integrated de-
velopment Environments (IDE). If your piece of code is not working then the debugger will
raise errors. From the error messages you can find out the problem and fix it. You keep fix-
ing your errors until the debugger no longer raises any errors. Once your code is completely
fixed then you can proceed to build (compile) your code.
You can also inspect your code manually. But the debuggers make it easier to do it automat-
Debugging can check many things in your code. First you can check if your code is syntaxic-
ally correct. You may have spelled some variable or any other programming entity wrongly.
If this is the case then your compiler will not accept it. The other aspects about debugging
are to check for integration with other systems, control flow etc.
Most debugging tools can find errors as far as your compiler is concerned. If you have not
declared your variables and used it in your code then the debugging tools can find it out and
raise error message. If you have misspelled your variables then the debugging tool will find
it. If integration points with other systems are in scope of the compiler then the debugging
tools will find it out. However if the other systems are not in scope then any debugger will
not be able to find if the integration is working or not. In most cases this is a problem as the
other systems may be offline or not reachable and thus checking for integration with them is
not possible. In such cases you can not check if integration is working or not.
Even if your code is syntaxically correct, it may have domain specific problems. For in-
stance, your piece of code may be doing some computation without errors but the compu-
tation logic itself may be faulty. This may lead to wrong computation results coming out of
your piece of code. In such cases, the debugging tools can not help. For checking these types
of errors you need to do domain testing. Thus this area is beyond debugging.
However you can check for control flow in debugging. For instance, you can check if the
loop you have implemented in your code is actually getting executed as per inputs provided.
Sometimes the inputs coming into a loop are above or below the condition values for the
loop; and the loop is never executed. Sometimes even if the loop gets executed; it is not ex-
ecuted as per the conditions you have set because either the condition is stated wrongly or
input values are coming to the loop incorrectly.
Search WWH ::

Custom Search