In a medium bowl mix flour, baking powder, baking soda and salt with a whisk (or sift all ingredients).
In a large bowl, cream butter and both sugars together on high until fluffy (a few minutes). Add vanilla and egg and mix on medium, scraping the sides of the bowl as needed to incorporate everything.
Add dry ingredients and combine on low speed until incorporated. Add M&Ms and mix with a wooden spoon.
Using a large cookie scoop or tablespoon drop heaping spoonfulls on a cookie sheet leaving 1 ½ to 2 inches between the cookies. Press to flatten each cookie slightly.
Bake until golden brown, about 15-20 minutes.
Variation: instead of putting the candies in the cookies, you can increase the flour by another ¼ to ⅓ cup and put the M&Ms on top in different shapes or designs.