Download NetBeans

NetBeans IDE Features

Debugger and Profiler

NetBeans Debugger screenshot
Click image for fullscreen preview

To identify and solve problems in your applications, such as deadlocks and memory leaks, NetBeans IDE provides a feature rich debugger and profiler.



The NetBeans Debugger lets you place breakpoints in your source code, add field watches, step through your code, run into methods, take snapshots and monitor execution as it occurs. You can also attach the debugger to an already running process.

The IDE includes a visual debugger to let you take GUI snapshots and visually explore the GUI of JavaFX and Swing applications. It lets you view component properties, the hierarchy of components in the container, and locate the source code of components. You can use the visual debugger to easily add listeners to GUI actions without requiring you to search through the source code.

Debugging Multi-threaded Applications in NetBeans IDE
Using the Visual Debugger in NetBeans IDE


The NetBeans Profiler provides expert assistance for optimizing your application's speed and memory usage, and makes it easier to build reliable and scalable Java SE, JavaFX and Java EE applications.

Select from several common profiling tasks, such as standard CPU or memory profiling, or simple monitoring. The options have been preset to default values by experts; you can customize settings for a specific application.

Introduction to Profiling Java Applications in NetBeans IDE

Multi-Threaded Debugging

Heap Walker

Generational Count

Heap Walker
To switch threads, use the Current Thread Chooser or access the threads navigation directly from the editor margin. You can check the state of the current session's threads and inspect the call stack and locale variables of the current thread.

Heap Walker
Use the Heap Walker to evaluate the Java heap contents and to identify unnecessary references that cause memory leaks. You can browse classes and instances of classes on the heap, fields of each instance or class, and references to each instance.

Generational Count
Generational counts allow you to identify objects that are surviving all attempts to collect them. This information can be used to find long lived and leaking objects.

Uncovering Memory Leaks Using NetBeans Profiler

See Also