If you want to see the Java™ processes
and step through the code for your Java visual
class while you are running it, you can choose the debug options.
About this task
Like the run commands, the debug commands start a virtual
machine and create and use launch configurations. However, by selecting
the debug menu options when running, you gain the added benefits of
the Debug perspective.
Procedure
- Open your visual Java class
in the visual editor.
- Switch to the Debug perspective by clicking from the main menu.
- From the main menu, select one of the following commands:
- if your class
has a public static void main(String[]) method.
- if your class has no
main method.
If you did not switch to the Debug perspective, the launch
configuration automatically opens the Debug perspective.
Results
The Debug perspective displays the Java threads and processes that you can work
with. You can use the standard Debug perspective options to step through
your code using breakpoints.