correct usage of grid in debug