Across the animal kingdom, dopamine plays a crucial role in conferring reinforcement signals that teach animals about the causal structure of the world. In the fruit fly Drosophila melanogaster, the dopamine system has largely been studied using a rich genetic toolbox. Here, we suggest a complementary pharmacological approach applying the dopamine-synthesis inhibitor 3-Iodo-L-tyrosine (3IY), which causes acute systemic inhibition of dopamine signaling. Using Pavlovian conditioning, across developmental stages (3rd instar larva versus adult), valence domains (reward versus punishment), and types of reinforcement (natural versus optogenetically induced), we find that 3IY feeding specifically impairs associative learning, whereas additional feeding of L-3,4-dihydroxyphenylalanine (L-DOPA), a precursor of dopamine, rescues this impairment. This study establishes a simple, quick, and comparably low-cost approach that can be combined with the available genetic tools to manipulate and clarify the functions of the dopaminergic system - in D. melanogaster and other animals.