In Java, while debugging, how can I search all objects in heap for text

106 Views Asked by At

I am trying to find a hidden piece of data inside some large maps in a Java program. It would be very easy if I could (in a way) "sed" or "grep" through all the objects in the heap and determine where a specific line of ASCII text exists.

Can this be done with Java code or with an IDE? I know it can be done in small ways by dumping variables into a log, but I'd rather not blow up my logs this way. Is there a way to run a search query on all my objects?

0

There are 0 best solutions below