Lightly coat the base of a microwave-safe mug or coffee cup with cooking spray.
In the mug, combine the flour, sugar, cocoa powder, baking powder, and salt. Stir thoroughly to blend the dry ingredients.
Pour in the milk, canola oil, and vanilla extract. Mix until the batter is smooth and no lumps remain, making sure to scrape the bottom of the mug. Either stir in the chocolate chips or scatter them on top.
Microwave for 70 to 90 seconds (see note) until the cake is just set, with a slight sheen remaining on the surface. (See notes below). Let the mug cake rest in the microwave for 1 minute before enjoying.