2Heat butter in a large, heavy pot over medium-high heat. Add onions; cook and stir until translucent, about 10 minutes.
3Sprinkle onions with sugar; reduce heat to medium. Cook, stirring constantly, until onions are soft and caramelized, at least 30 minutes. Stir in garlic and cook until fragrant, about 1 minute.