Well, there are a lot of things to consider when you are doing entity AI. As mentioned before, there is a priority to the AI. There is also something called "mutex" which stands for mutually exclusive. This indicates which AI can run at the same time and which cannot.
I have an explanation of entity AI in a tutorial here: http://jabelarminecraft.blogspot.com/p/minecraft-forge-1721710-custom-entity-ai.html
To debug, you should just use the normal debug strategies -- set breakpoints and use Eclipse debug mode to make sure that your code is executing and further to check the value of key fields during the execution. Alternatively you can add console print statements, but assuming you're using the built-in AI classes that can be a pain because you'll have to copy them and make your own versions in order to add the prints. So I suggest starting with breakpoints. Based on that, confirm that your AI is executing and then it is usually pretty easy to figure out what is wrong after that.