Although the Drosophila melanogaster (fly) model is a popular platform for investigating diet-related phenomena, it can be challenging to measure the volume of agar-based food media flies consume. We addressed this challenge by developing a dye-based method called Consumption-Excretion (Con-Ex). In Con-Ex studies, flies consume solid food labeled with dye, and the volume of food consumed is reflected by the sum of the dye inside of and excreted by flies. Flies consumed-excreted measurable amounts of FD&C Blue No. 1 (Blue 1) and other dyes in Con-Ex studies, but only Blue 1 was readily detectable at concentrations that had no discernable effect on consumption-excretion. In studies with Blue 1, consumption-excretion (i) increased linearly with feeding duration out to 24 h at two different laboratory sites, (ii) was sensitive to starvation, mating status and strain, and (iii) changed in response to alteration of media composition as expected. Additionally, the volume of liquid Blue 1 consumed from capillary tubes was indistinguishable from the volume of Blue 1 excreted by flies, indicating that excreted Blue 1 reflects consumed Blue 1. Our results demonstrate that Con-Ex with Blue 1 as a food tracer is a useful method for assessing ingestion of agar-based food media in adult flies.