Peel and thinly slice the onions.
Melt butter in a large skillet and cook onions over medium heat for 20–25 minutes until soft and golden.
Add garlic and thyme and cook for 1 minute more.
Season with salt and black pepper and remove from heat.
Preheat oven to 350°F and transfer onions to a greased baking dish. Stir in cream, Gruyère, and Parmesan.
Sprinkle breadcrumbs evenly over the top.
Bake uncovered for 25–30 minutes until bubbly and lightly golden. Rest before serving.
