It is known that branches of homoclinic orbits emanate from a singular point of a dynamical system with a double zero eigenvalue (Takens-Bogdanov point). We develop a robust numerical method for starting the computation of homoclinic branches near such a point. It is shown that this starting procedure relates to branch switching. In particular, for a certain transformed problem the homoclinic predictor is guaranteed to converge to the true orbit under a Newton iteration.