BPDUGuard, BPDUFilter, and Loopguard will prevent STP loops, but Storm Control about the only feature I've found that will detect them. Just set all the access ports to something ridiculously high (i.e. 25% broadcast, 75% multicast) and set the action to trap or better yet shutdown. Even if you have a loop, storm control will not only contain the damage but tell you the port it originated on.
is a great feature for controlling the damage caused by STP loops.
Keep Up with TechRepublic