You can take a when a profiling session is in progress. When you take a heap dump you are prompted to save the heap to your project or local file system. After you save a heap dump, you can load the heap dump at any time and browse the objects on the heap and locate references to individual objects. You do not need to have a running profiling session to load and browse the heap dump.
If a profiling session is in progress you can take and save a heap dump. You can take a heap dump manually or set a profiling point to take a heap dump automatically at a certain point in your application. In the Options window, you can also set the IDE to automatically take a heap dump on OutOfMemory error.
To take a heap dump manually:
When you take the heap dump, you are prompted to specify where you want to save the heap dump. You can save the heap dump snapshot to your project or to any location on your local filesystem.
To take a heap dump using a profiling point:
When you use a profiling point to take a heap dump, you specify the point in your source code where you want to place the profiling point. For example, you may want to take a heap dump when a thread enters a specific method.
To take a heap dump on OutOfMemory error:
You can load and browse a heap dump at any time. You do not need to be running a profiling session to load a heap dump.
When you load a heap dump, the heap dump opens in the Heap window.