Preheat oven to 450 degrees. Place potatoes on a baking sheet; bake until tender, about 45 minutes. Meanwhile, melt butter in a large nonstick skillet over medium-low heat. Add onions; cook until soft, about 15 minutes. Sprinkle with sugar, salt, and pepper; toss to coat. Continue to cook, stirring occasionally, until onions are very soft and caramelized, about 1 hour more, adding water a tablespoon at a time if pan dries. Stir in vinegar. Set aside; keep warm.
When the potatoes are tender, split open, and top with caramelized onions and shaved Parmesan. Serve warm.