Databases Reference
In-Depth Information
Debugging the application
JDeveloper 11 g R2 supports the debugging feature, which will allow a developer to debug the
applicaion code to ix an issue or isolate a problem in the producion environment. Some of
the common debugging pracices are discussed in this secion.
Debugging practices
Some of the debugging pracices are as follows:
Resolving compilaion errors : This is very simple to resolve as part of the issues will
be related to the coding issue. Compilaion issues can occur during Java compilaion,
XML parsing, XML validaions, and so on.
Print values : The basic debugging technique that is known to any Java developer
is to print the values using System.out.println statements in the console to
verify if the program behaves as expected. This, however, is not recommended and
a Logger API is used instead. The ADF recommendaion is to use the ADFLogger
API, which is configurable to print the values in the logfile.
Breakpoints : Another way to debug is to insert a breakpoint next to the statement
and debug the code. When the corresponding statement is about to process, the
breakpoint is highlighted and the control is given to the developer to inspect and
analyze the variable values, statuses of the object at that ime, and so on. We have
to start the applicaion in debug mode and then uilize the Inspect , Smart Data ,
and Watch Windows features to debug the code efficiently.
Condiional debugging : Condiional debugging is the opion provided to highlight
the breakpoint, only when a paricular condiion becomes valid. In order to set the
condiional breakpoint, you will have to hover over the breakpoint and enter the
condiion, as shown in the following screenshot:
 
Search WWH ::




Custom Search