In a large pot or Dutch oven, heat the butter and olive oil over medium heat. Add the sliced onions and stir well.
Cook the onions slowly, stirring occasionally, until they are soft and caramelized, about 30 minutes. Add the sugar halfway through to help with caramelization.
Once the onions are golden brown and sweet-smelling, pour in the white wine. Let it simmer for about 5 minutes, scraping the bottom of the pot to release any flavorful bits.
Add the beef broth, thyme, salt, and black pepper. Bring the mixture to a gentle simmer and let it cook for another 10 minutes to allow the flavors to meld.
Preheat your oven to 400°F (200°C).
While the soup is simmering, place the slices of French bread on a baking sheet and toast them in the oven until golden and crispy, about 10 minutes.
To serve, ladle the hot soup into oven-safe bowls or ramekins. Place a slice of toasted bread on top of each bowl and cover generously with the shredded Gruyère cheese.
Place the bowls on the baking sheet and put them back into the oven. Bake until the cheese is bubbly and golden, about 5-7 minutes.
Remove from the oven (caution: bowls will be hot) and let cool briefly. Garnish with fresh parsley if desired before serving.