. Step (Web design conference) Over (F6). Used on a method
Sunday, December 30th, 2007. Step Over (F6). Used on a method call, this function will step over the invoked method (provided the method does not contain active breakpoints). . Step Return (F7). The current method is executed in normal mode. When the method returns, step mode is reactivated. . Step with Filters (Shift+F5). When you use this function the step operation is influenced by the step filters defined in the preferences (see the Debug Configuration section). All other functions ignore the step filters. After executing a program step by step, you can retrace the single steps backwards by pressing the Back navigation button (see the Navigation section in Chapter 4)! Setting Breakpoints How do you start a debug session? You would usually set a breakpoint at an interesting location in your program. This is easily done by double-clicking the left margin of the Java source editor. It doesn t matter if you do this in the Java Perspective or in the Debug Perspective. You can remove the breakpoint with another double-click at the same position. Now, set a breakpoint onto the Dimension d = getSize() instruction in the paintComponent() method in the Face class, as shown in the previous figure. When you start the debug process by clicking the Debug button, the program will stop at this instruction. The variable values of the current object appear in the window at the right-hand side. Testing Interactively You have now the following possibilities: . You can continue the execution of the program by pressing F8. The program will be interrupted only when it passes this breakpoint again. . You can stop execution by clicking the Terminate button. . You can execute the getSize() method step by step by pressing the F5 key. . You can step over the getSize() method by pressing the F6 key. . You can set further breakpoints, or you can remove breakpoints. Variables You have the following options for variables: . You can view the content of variables by hovering with the cursor over a variable name in the source editor. . In the Variables View you can take a closer look at the variables of the current execution environment. Complex objects can be expanded by clicking the + character (or by double-clicking the variable name) so that you can view their details. . In the execution stack in the Debug window you can select a different execution environment. For example, you may select: Player(java.awt.Container).paint(java .awt.Graphics) line 1123. 116 Chapter 6
We will hook you up with a JSP web hosting at the great rate, check our jsp web hosting, and join us today!!!