E Using the Debugger

Objectives

In this appendix you’ll:

  • Set breakpoints to debug applications.

  • Run an application through the debugger with the run command.

  • Set a breakpoint with the stop command.

  • Continue execution after a breakpoint is reached with the cont command.

  • Evaluate expressions with the print command.

  • Change variable values during program execution with the set command.

  • Use the step, step up and next commands to control execution.

  • See how a field is modified during program execution with the watch command.

  • Use the clear command to list breakpoints or remove a breakpoint.

Get Java How To Program, Late Objects, 11th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.