In a large skillet, melt the butter and olive oil over medium heat. Add the sliced onions and stir to coat. Cook for about 10 minutes until they begin to soften.
Add the minced garlic and sugar to the skillet. Continue to cook the onions, stirring occasionally, until they are caramelized and deep golden brown, about 25 minutes.
Transfer the caramelized onions to the slow cooker. Add the beef or vegetable broth, dried thyme, bay leaf, and season with salt and pepper.
Stir the mixture well, cover, and cook on low for about 8 hours. If desired, you can cook on high for 4 hours.
About 30 minutes before serving, preheat the oven to broil. Arrange the French bread slices on a baking sheet and toast until golden brown on both sides.
Once the soup is ready, remove the bay leaf. Ladle the soup into serving bowls and place a slice of toasted French bread on top of each bowl.
Generously sprinkle the shredded Gruyère cheese over the bread. Place the bowls under the broiler for 2-3 minutes, until the cheese is bubbly and golden.
Serve hot and enjoy!