Beat the softened butter and sugar together until the mixture turns pale and fluffy, about two to three minutes. This step traps air in the dough, which is what gives these cookies their soft, slightly chewy texture once baked. Don't rush it, because under-creaming is one of the easiest ways to end up with flat, dense cookies.
Mix in the egg, vanilla extract, and peppermint extract until fully combined. The dough will look slightly glossy at this stage, which is exactly what you want. Scrape down the bowl so nothing gets left unmixed at the bottom.
In a separate bowl, whisk together the flour, baking powder, and salt. Adding the dry mix gradually to the wet ingredients keeps the dough from turning tough. Stop mixing as soon as the flour disappears into the dough.
Split the dough into two equal portions, and knead red gel food coloring into one half until it's evenly tinted. Keep the other half plain white so the contrast is crisp once twisted. I like weighing the halves on a kitchen scale so both candy canes end up the same thickness.
Wrap both portions in plastic wrap and refrigerate for about 30 minutes. Chilling firms up the butter, which keeps the stripes distinct instead of melting into each other in the oven. Skipping this step is the main reason candy cane cookies lose their shape.
Roll a small piece of each color into a thin rope, about four inches long, then twist the two ropes together gently. Curve the top slightly to form the classic hook of a candy cane. Place the shaped cookies onto your lined baking sheet, leaving space between each one.
Bake at 350°F for 8 to 10 minutes, just until set but not browned. While they're still warm, press crushed candy canes onto the surface so the pieces stick. Let the cookies cool on the sheet for a couple of minutes before moving them to a wire rack.