go to great lengths

(idiomatic) To make a major effort; to be very careful when doing something, especially to an extreme or excessive degree.

Example: 2008, José Rodrigues does Santos, Codex 632: The Secret Identity of Christopher Columbus (trans. from the Portuguese by Alison Entrekin), William Morrow (2008), ISBN 9780061173189, page 262:
  […] They said good-bye on the eleventh, and the Portuguese noblemen saw him off, going to great lengths to show him respect."
2009, Diego Gambetta, Codes of the Underworld: How Criminals Communicate, Princeton University Press (2009), ISBN 9780691119373, page 272:
  Most scholars writing on the mafia were going to great lengths to demonstrate that it did not exist—and the mobsters wanted to keep their brotherhood secret.
2013, Chad R. Torgerson, Waking Up Catholic: A Guide to Catholic Beliefs for Converts, Reverts, and Anyone Becoming Catholic, Assisi Media (2013), ISBN 9780989531900, page 62:
  As a father, I would go to great lengths to protect my children.