Always start from the beginning to eliminate as much as possible.
check rear der hanger alignment with tool...w/o tool is a failure
check shifter/cable/housing by removing cable at rear der and holding cable end in one hand shift up and down with a bit of tension on the cable to see if the shifter is working properly and can also feel for binding of cable in housing
check rear der manually to make sure it flows up and down smoothly...just move it with your hand
if cable/housing is several years old...replace...part of maintenance
there is much more but this is the basics for what you are asking about