How not to blow up a BLDC motor and its driver while code development
One thing I have done in BLDC motor driver development is to put a suitable incandescent lamp in series with the bridge power supply. If the light comes on bright it just saved you a set of transistors. 

Of course you are going to follow proper code development techniques to make the BLDC drive logic as independent as possible of the rest of your program, test it in simulation and with drive current limited, and ensure that everything looks wonderful on your multichannel scope before trying to drive a motor. 

And maybe you should make sure you have a good desoldering tool and a few sets of replacement power components on hand, just in case.