It really isnt all that hard to visualize. Make sure that you have white board handy while debugging to make sure that the tree is rotating correctly.
Anyway...
An AVL tree should already be balanced everytime that you try to insert (That is why it is an
AVL tree), so that means that the only part that can be messed up is the side where the insertion was made. To check for balance, start at the parent of the new leaf node and check your children variables (Every node should have two variables that keep track of the number of left and right children that that node has). If the difference of these variables is more than one, then the tree needs to be rotated, after the rotation it will be balanced. If that node IS balanced correctly then you must move up to its parent and do the same thing. This must be done all the way up to the root node of the tree.
REMEMBER: The critical node is the LOWEST unbalanced node, so if the first node you check needs to be rotated, then you are done checking. If not, you must go up to the next. If you make it all the way to the root and none were unbalanced, then the tree was never out of AVL form.
Hope that helps.