Preheat the oven to 200 gr. Cover a baking sheet or baking dish with baking paper. Put tomatoes and onions on it. Drizzle with olive oil, squeeze garlic on top, sprinkle with sugar, salt and pepper. Put in the oven for 20 minutes. Tomatoes should become soft, but keep their shape.