Tutorial of Mark Dexter -Eclipse and Java: Using the Debugger

Tutorial Code


Lesson 1
● Discuss Tutorial Target Audience
● Introduce Debugger concepts
● Create Java project in Eclipse using Import from archive file
● Run MyLibrary main method in debug mode
● Learn how to use Step Over, Step Into, and Step Return commands to step through program

Lesson 2
● Apply Step Filters
● Learn more about Step commands
● Use multiple breakpoints and Resume command
● Use Run to Line command
● Explore Stack Frames and Variables view
● Inspecting expressions

Lesson 3
● Use the Expressions view and Watch Expressions
● Use the Display view to create Watch Expressions
● Debug with JUnit tests
● Start debugging the MyLibrary class
● Select Expressions using short-cut keys

Lesson 4
● Use Exception Breakpoints
● Set Eclipse Debugger preferences
● Correct bugs with hot code replacement
● Use Drop To Frame to rewind a debug session
● Change the value of variables inside a debug session

Lesson 5
● Implement breakpoints options: conditional breakpoint, hit counts
● Set watchpoints (field breakpoints) and Class Prepare breakpoints
● Use the Stop at main (open debug run dialog)
● Use the Suspend command
● Use the Step into selection command

Lesson 6
● Debug into Java system classes (e.g., ArrayList)
● Use the debugger to illustrate Java object references and the String .equals() method

Lesson 7
● Use the debugger to understand a recursive method
● Use the Drop to Frame command with stack frames to rewind the debug session


Eclipse Website

www.eclipse.org/resources . This lists a number of articles, books, presentations,
demonstrations and other resources on a variety of topics related to Eclipse.

Java Websites

● The Java Tutorials from Sun (http://java.sun.com/docs/books/tutorial/java/index.html). This is
the gold standard for learning Java, and it’s free.

Copyright © 2007 Mark Dexter. Licensed under the Educational Community License version 1.0.