Try to ensure we don't attach to window if using a debug device. Also, un-attach from window when resetting render config.