. The source editor automatically shows the corresponding (Christian web host)

. The source editor automatically shows the corresponding source code, and the Variables View shows the variables of this execution environment. . You can modify variables. By double-clicking a variable in the Variables View you can open an editor for the variable s value and modify the value. Alternatively, you can edit the value in the Details section of the Variables View and then assign it by invoking the Assign Value context function. . By applying the Watch context function to individual variables you can add those variables to the Expressions window. As you step through the program, the variables in the Expressions window will be updated when their value changes. This provides a way to monitor specific variables during program execution. HotSwap During a debug session you can apply changes to the program code and save (and compile) the changed code. In many cases provided you run under JDK 1.4 the debug session need not be restarted but can continue with the modified module in place (HotSwap). In some cases, however for example, when the signature of a public method is changed using HotSwap is impossible. In this case you are prompted whether to abort or restart execution. Testing Expressions In the Display View (and also in the Details area of the Expression View), you can enter expressions that can be executed within the current execution context (see also the discussion of the Scrapbook in Chapter 1). To do so, select the entered expression and invoke the Inspect or Display context function. For example, if you execute the getBackground() expression while in the execution context of Player.paint() (see above), the Display function will deliver the background color of player. Managing Breakpoints The Breakpoints View shows an overview of all defined breakpoints. Here, you can delete breakpoints that you don t need anymore or position the source editor to a breakpoint position by double-clicking it. With the Disable context function you can disable a breakpoint temporarily. With Enable you can activate it again. The Properties context function allows further customization of breakpoints (Figure 6.3). The breakpoint properties dialog allows for detailed instrumentation of a breakpoint. By setting a hit count, the breakpoint is activated only after several passes through it. You can also specify an additional condition under which the breakpoint should become active. The breakpoint is activated either when the Boolean value of the condition is true or when the value of the condition changes, depending on the option chosen. Another useful function of the Breakpoints View is the Add Java Exception Breakpoint function (the button with the exclamation mark). When invoking this function you can select an exception type from a list. Usually, Eclipse aborts program execution when an uncaught exception occurs and shows you the stack trace. But with this function, you can interrupt directly at the point where the exception occurs and look into variables and so on. Better still, you can even optionally trap exceptions that are caught in a try/catch block. It is a good idea to set Java Exception Breakpoints for common uncaught exception types such as NullPointerException, ClassCastException, and IndexOutOfBoundsException. 117 Project Development
We are dedicated to offering you a reliable, fast, and scalable unlimited web hosting home for your business, and personal web sites.Go and see our shared web hosting services.

Leave a Reply