In a mixing bowl, whisk together the flour, baking soda, baking powder, and salt. Set aside.
In the bowl of a stand mixer fitted with the paddle attachment, combine the softened butter, light brown sugar, and granulated sugar. Mix until well combined, about 2 minutes. Add the whole eggs and egg yolk one at a time, mixing after each addition. Mix in the vanilla.
With the mixer running, slowly add the flour mixture and mix until just combined. Stir in the toffee bits and M&M's.
Using a 2-tablespoon cookie scoop, portion the dough on a parchment-lined baking sheet. Roll the top of each ball of dough in toffee bits. Put the sheet pan in the refrigerator and chill for one hour, or overnight.
Preheat the oven to 375℉. Bake the chilled balls of cookie dough for 10-11 minutes until lightly brown around the edges. The centers will look slightly underdone. Immediately after removing from the oven, press 4-5 M&M's into the top of each cookie and sprinkle with flaked salt. Let cool on the baking sheet for 5 minutes before transferring to a cooling rack.
Store in an airtight container. The cookies will keep for 4-5 days.