Recipe Debugging Through Breakpoints

Developers can also run applications in debug mode and insert breakpoints to freeze an application in run-time. First, the application needs to be launched in debug mode, which displays the dialog shown in Figure 12.4. IfYes is selected, it switches to the Debug perspective shown in Figure 12.5.

The Debug perspective displays the source file in a window along with some other windows including variables, breakpoints, outline, and others. Developers can toggle a breakpoint by double-clicking in the left-hand margin next to the line where the code execution should freeze. A breakpoint is set when a small blue circle is present on that line.

Using breakpoints is a standard debug method for embedded programmers. The ability to stop at an instruction, step through functions, see variable values in memory, and modify values in run-time provides a powerful method to chase down complicated bugs and unexpected behavior.

ft Confirm Perspective Switch

I "in kind of launch is configured la open the Debug perspective when it suspends.

This Debug perspective Is designed to support application debugging. It ■■ ■ -ki ■ 11.", uieuvt fi.- displaying thn rfphng / «■ i ' ' i M * <. and w;vi management.

Do you want to open this perspective now? G Hemember my decision

Figure 12.4 The Confirm Perspective Switch dialog box.

Figure 12.5 The Debug perspective in Eclipse.
Character Building Thought Power

Character Building Thought Power

Character-Building Thought Power by Ralph Waldo Trine. Ralph draws a distinct line between bad and good habits. In this book, every effort is made by the writer to explain what comprises good habits and why every one needs it early in life. It draws the conclusion that habits nurtured in early life concretize into impulses in future for the good or bad of the subject.

Get My Free Ebook

Post a comment