go to any length
Also, go to great lengths. Take a great deal of trouble for something, go to extremes. For example, He'll go to great lengths to make a perfect chocolate cake, or, as Benjamin Disraeli put it in Coningsby (1844): "He would go ... [to] any lengths for his party."
Dictionary.com presents 366 FAQs, incorporating some of the frequently asked questions from the past with newer queries.