Web hosting script - Figure 6.3 If you have trapped an exception
Figure 6.3 If you have trapped an exception with such a breakpoint, program execution is interrupted when the exception occurs. In the Debug window you now can select a method within the stack trace shown under the current thread. The Variables View shows you the variables of the method s execution environment, so that in most cases you can easily determine the reason for the exception. Finally, the Skip All Breakpoints tool button in the Breakpoints window allows you to disable all breakpoints temporarily. The Java Console Although the debugger provides you with a rich arsenal of tools to find bugs in programs, you should not ignore the Java console. To find a problem, it is sometimes simpler to program a test output into a method or constructor instead of spending ages stepping through program code. You can accomplish such outputs with System.out.println() or System.err.println(). By using the Code Assistant (see the Java Information Windows section Chapter 2), you can simply enter sysout or syserr to create such an instruction. In the case of a program crash, the console is a valuable source of information, too, since it displays the execution stack. Eclipse here offers additional help: double-clicking a stack entry opens the corresponding compilation unit and positions the editor window to the specified line! 118 Chapter 6
Our company is website hosting provider which offers web hosting services for php, java, mysql, frontpage, dreamweaver and domain name registration. Check more about us on website hosting provider part.