Debugging a Unit Test

See Also

You can debug a test class as you would any class. After you set your breakpoints in the test class you can run your unit test in the debugger and step through the code to locate problems in your test classes.

  1. Place your breakpoints in your test class.
  2. Select the node for the class whose test you wish to debug.
  3. Choose Debug > Debug Test File (Ctrl-Shift-F6) from the main menu.

    Alternatively, you can right-click the test class node in the Projects window and choose Debug Test File (Ctrl-Shift-F6).

When you choose Debug Test File the IDE starts the test in the debugger and opens the Debugging window.

See Also
Running a Unit Test
Creating a Unit Test
About Running Java Applications
About Debugging Java Applications

Legal Notices