Preheat oven to 350°F (175°C). Place butter in the baking dish and allow it to melt in the oven.
In a medium bowl, whisk together sugar, cocoa, flour, baking powder, and salt.
Stir in milk and vanilla extract until smooth.
Spread the batter evenly over the melted butter in the dish—do not stir.
Mix sugar and cocoa powder in a separate bowl, then sprinkle over the batter.
Pour boiling water evenly over the topping—again, do not stir.
Bake for 35–40 minutes until the top is set but the bottom is gooey.
Rest for 10–15 minutes to allow the sauce to thicken.
Scoop into bowls and top with vanilla ice cream.