Dries Buytaert recently published a great post on how to prepare for Drupal 9. He explains how we build Drupal 9 in Drupal 8 using deprecations and the tools to use to detect use of deprecated code. One of the tools I worked heavily on with Zoltán Herczog in the past few weeks is Upgrade Status, and Zoltán just released the alpha2 version. It is definitely worth a try!
Here is how it works: