Heat the butter and olive oil in a large saucepan or Dutch oven over medium heat.
Add the sliced onions, salt, and sugar. Cook, stirring frequently, for about 30 minutes or until the onions are golden brown and caramelized.
Stir in the white wine and cook for another 5 minutes, scraping any browned bits from the bottom of the pan.
Add the beef broth, thyme, and bay leaf to the pot. Bring to a boil, then reduce the heat and let it simmer for 15 minutes.
Remove the thyme sprigs and bay leaf. Season the soup with freshly ground black pepper to taste.
Preheat the oven to 350°F (175°C).
Ladle the soup into oven-safe bowls or crocks, leaving some space at the top.
Place a slice of toasted French bread on top of each bowl, then sprinkle with the shredded Gruyère cheese.
Place the bowls on a baking sheet and bake in the preheated oven for about 15 minutes, or until the cheese is bubbly and golden brown.
Carefully remove from the oven and let cool slightly before serving. Enjoy your comforting bowl of French Onion Soup!