Prep the Onions: Start by slicing the onions thinly. The thinner the slices, the better they will caramelize.
Caramelize the Onions: In a large pot, melt the butter over medium heat. Add in the sliced onions and sprinkle with salt. Cook, stirring occasionally, for about 25-30 minutes until the onions are deeply golden and caramelized.
Add Flour and Sugar: Once the onions are done caramelizing, stir in the flour and sugar. This will give your soup a lovely thickness. Cook for an additional 2 minutes.
Pour in Broth: Gradually add the beef broth while stirring. Bring the mixture to a simmer and add thyme, black pepper, and more salt if desired. Allow it to simmer for 15 minutes, letting the flavors meld.
Toast the Bread: While the soup is simmering, preheat your oven to 400°F (200°C). Place French bread slices on a baking sheet and toast them for 5-7 minutes, until crispy.
Assemble: Divide the soup into oven-safe bowls. Place a piece of the toasted French bread on top of each bowl and layer generously with shredded Gruyère cheese.
Broil: Carefully place the bowls under the broiler for about 2-3 minutes until the cheese is beautifully melted and bubbly. Watch closely to avoid burning!
Serve & Enjoy: Let the soup cool for a moment before serving, and enjoy every savory bite!