Peel and chop the onions. Melt the butter in a big pot.
Add the onions and sauté. Stir regularly to avoid the onions to burn. If they stick at the bottom, add a little bit of water. Sauté until they caramelize.
Add the flour and stir. Add the water, the stock cube, the sugar, the thyme, the salt and the pepper.
Cover and leave for 45 minutes at medium heat.
Serve the soup in ovenproof bowls, and add some pieces of stale bread. Cover with grated cheese.
Put in the oven, the gril function on, for 10 minutes, or until the cheese gets grilled.
There you are, your French onion soup is ready! Bon appétit!