Cut each onion into six wedges. Sprinkle the chicken with pepper.
Coat a large non-stick frying pan with cooking spray. Add 1/2 the butter and melt over a medium–high heat. Sauté the chicken for about 3 minutes on each side or until browned. Transfer to a plate.
Reduce the heat to medium and melt the remaining butter in the pan. Sauté the onions with 1 tablespoon of the sugar for about 8 minutes or until they are golden brown and caramelised. Stir frequently, breaking the onions apart as they cook. Add the stock and boil for about 2 minutes or until it has evaporated.
Stir in the rosemary, thyme and remaining sugar. Return the chicken to the pan and sprinkle with the vinegar. Cook for a further 4 minutes or until the juices from the chicken run clear.