-
Book Overview & Buying
-
Table Of Contents
Eclipse Plug-in Development Beginner's Guide - Second Edition
By :
Debugging an Eclipse plug-in is much the same as running an Eclipse plug-in, except that breakpoints can be used, the state of the program can be updated, and variables and minor changes to the code can be made. Rather than debugging plug-ins individually, the entire Eclipse launch configuration is started in debug mode. That way, all the plug-ins can be debugged at the same time.
Although run mode is slightly faster, the added flexibility of being able to make changes makes debug mode much more attractive to use as a default.
Start the target Eclipse instance by navigating to Debug | Debug As | Eclipse Application, or by clicking on debug
in the toolbar.
SampleHandler class and go to the first line of the execute method.

The debugger perspective will open whenever a breakpoint is triggered and the program will be paused. While it is paused, the target Eclipse is unresponsive. Any clicks on the target Eclipse application will be ignored, and it will show a busy cursor.
this), any local variables (none yet), as well as the parameter (in this case, event).
or press F8 to keep running.
The built-in Eclipse debugger was used to launch Eclipse in debug mode. By triggering an action that led to a breakpoint, the debugger was revealed, allowing the local variables to be inspected.
When in the debugger, there are several ways to step through the code:
There is also a Run | Step into Selection menu item; it does not have a toolbar icon. It can be invoked with Ctrl + F5 (Alt + F5 on macOS) and is used to step into a specific expression.
Change the font size
Change margin width
Change background colour