I think that we can use rotation/spin in order to deflect the debris/parts away from a collision course. If the axis of rotation of the asteroid is more or less parallel with its path, an explosion should split the asteroid in parts going away from the axis/collision path. If the rotation is too weak, we can increase it, with well placed thrusters, prior to the carefully planned explosion.
If there is no spin, or the axis is perpendicular to the asteroid path, we may use thrusters to deflect the entire asteroid. We can use as thrusters craters/wells on a side (at a pole, if it spins), where we initiate some chemical reactions or we simply heat them using large arrays of space mirrors (ultrathin reflecting sheets). The arrays of mirrors should be deployed in advance, in all directions, and used as solar power plants, before being converted into solar guns.