I debug my program and add here and there a breakpoint. After a stop I want to inspect some of the variables and get sometimes a com.sun.jdi.ObjectCollectedException
Instead of turning off logical structure, you can add a logical structure formatter, as detailed in this answer: Eclipse debug mode view instance variable values. This prevents the exception and lets you see the variable in a useful way.