Melt the butter in a 12-inch skillet over low heat. Remove the skillet from the stovetop.
Add the brown sugar, white sugar, and vanilla extract to the skillet and stir to mix. Beat the eggs in a small bowl and add the eggs to the butter-sugar mixture, stirring until incorporated.
In a bowl, whisk together the flour, baking powder, baking soda, and salt. Pour the melted butter-gar mixture into the bowl and stir with a wooden spoon until fully incorporated. Add the chocolate chips and M&M's if using and stir the chips into the dough. Sprinkle just a few chocolate chips and M&M's on the top for a pretty presentation.
Pour the batter back into the skillet and bake for 20 t0 25 minutes until it's mostly set in the center. Top with flaky sea salt. Serve with vanilla ice cream.