Coffee and dark chocolate flavours in a stout or porter can be conjured by preparing malt in particular ways, such as in a similar roaster to that used to make bakers’ cocoa or espresso coffees. A similar effect can be achieved by adding cocoa or ground coffee, which some brewers do. A few use instant coffee, or essence.
The terms Espresso stout and Breakfast stout usually imply that coffee grounds have been added.
All of this brings into question whether there is a legitimate place for ingredients that imitate flavours that authentic methods of beer production can create. If it is, should brewers use quinine to create bitterness, or hay for grassiness?