Melt butter and olive oil in a large pot over medium heat.
Add sliced onions and stir well.
Cook for about 30 minutes, stirring frequently until onions are caramelized.
Sprinkle sugar over onions to enhance sweetness.
Add minced garlic and cook for 1 minute.
Pour in the white wine and cook until reduced by half.
Add beef broth and thyme, bringing to a simmer.
Season with salt and pepper to taste.
Let the soup simmer for 20 minutes to develop flavors.
Serve in oven-safe bowls with toasted baguette slices on top, covered with cheese.
Broil for 5 minutes, or until cheese is bubbly and golden.