GraphicsEnv: refactor to unify the debuggable logic am: fe62271bc3

Change-Id: I2bb295fbf56168beefa5dd26ea21cb85a90a6752