Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable Memory monitors in Eclipse (Java project)?

I am trying to inspect the memory contents (bytes) of an object in a Java project. The program is paused in the Eclipse IDE.
How ever: the Memory view is disabled - as in: the Add Memory monitor + button is greyed out.

Eclipse-Memory_view-disabled

Why?

like image 248
Ujjwal Singh Avatar asked Mar 21 '14 12:03

Ujjwal Singh


People also ask

How do I monitor memory in Eclipse?

Goto Window > Preferences > General and enable Show heap status and click OK. In the status bar of eclipse (bottom of the screen) a new UI element will appear. We can see 3 things: The amount of used memory by the application (including garbage that has not been collected), in the example 111MB.

How do I resolve memory issues in Eclipse?

We can increase eclipse memory by providing more Permgen space and heap memory for Eclipse to use. These settings are usually configured in the eclipse. ini file. You can check the location of the eclipse.


1 Answers

This question seems to be unanswered for quite a while and the one above sure doesn't help. This is the only post about it I could find.

In the Eclipse Help platform information about Memory view can be found in the C/C++ Development User Guide > Reference > Debug Views > Memory View but that isn't useful when were on Java. In the Java Development Guide it isn't as easy to find. Adding just Java Development Guide to the scope and searching for memory returns information about the Memory View in Running and Debugging but doesn't help very much. It is a view but isn't found in the same > Reference > Debug Views > as the C/C++ Guide.

When running a program in Debug mode in Eclipse C\C++ the + in the Memory view lights up and you can add addresses. However, running your program in Debug view doesn't seem to do the same in Eclipse Java. I'm assuming it can't be used in Java Eclipse or has a special case use that isn't mentioned.

like image 92
Matthew Wright Avatar answered Sep 20 '22 18:09

Matthew Wright