Place sliced onions, butter, sugar and garlic into a covered pan on medium, stirring occasionally until onions are brown and soft (caramelized). While onions are cooking boil pasta to directions on box.
Put heavy cream and salt/pepper into onion mixture and stir on heat until incorporated.