I remember reading, I think it was in the "History of the World in 6 Glasses", that regarding grains, in ancient mesopotamia, first people would make gruel, which was wheat mixed with water, and from their they made either bread and from breadmaking we got brewing, or made beer, and from there we got breadmaking, but there was controversy as to which came first. So two parts to this question:
First, a little background. Your question requires us to go back to a period we call the Epipaleolithic, the period after the Paleolithic but before the Neolithic. Also, we will need to look at a region called the Levant (the Eastern Mediterranean coast and hinterlands) rather than Mesopotamia, which is located further east.
The Levantine Epipaleolithic is a period of increasing sedentism, or year-round settlement in an area, and of increasing management of wild resources that over time resulted in early domestic varieties of plants and animals. There are several archaeological cultures that are found at this time and place, but one of the best understood is called the Natufian culture. The Natufian culture is dated to around 12,500-9500 BC and appears to be proto-sedentary to sedentary but not engaged in agriculture or using domesticated plants. Rather, the Natufians were essentially hunter-gatherers, particularly hunting gazelles, and collecting a wide variety of wild plants, including einkorn wheat. Importantly, the Natufians also had a technology we call ground stone tools, which are stone tools made by techniques other than chipping. These tools include things like mortars and pestles and grinding slabs, which were used for processing wild foods, like cereal grains, into more usable food products.
So now we have the preconditions to address those food products, namely bread and beer. It is useful to think of both beer and bread as food preservation strategies that allow for collected cereals to last longer before spoilage than they may otherwise. As to which came first, it is often a problem of preservation and luck resulting in being able to find data that suggests the presence of these food products. We have early evidence for "beer" and "bread" at two Natufian sites from some recent studies.
Let's start with beer. Liu and colleagues (2018) found evidence for beer production at Raqefet Cave in Israel dated to 13,700-11,700 cal BP (about 11,700-9,700 BC). In this cave, among other things, they found nearly 100 ground stone mortars and cup marks, or deep grooves in immobile rocks. By combining residue analysis of starches, use wear on the stone tools, contextual analysis (what else is associated with these tools), and experimental archaeology, they concluded that beer was being brewed and was part of the inhabitants' dietary intake. They further conclude that, given the numerous burials in associated at this site, that the beer was produced and consumed in mortuary contexts along with other foodstuffs. The amount of labor required to make the deep stone mortars further signals the importance that the beer was imbued with by the inhabitants.
Now for bread, though you should imagine a type of bread that is more of a dense cake-like food than fluffy, yeasty bread. These are typically called "bread-like products." Arranz-Otaegui and colleagues (2018) found evidence for bread production at Shubayqa 1 in eastern Jordan, dated to 14,600-11,600 cal BP (about 12,600-9,600 BC). The team identified 24 samples of bread-like products at Shubayqa 1 found in the fireplaces of two huts. Through microscopic analysis of the preserved bread-like products, they conclude that these were unleavened flat breads. The grains that made up these foods include species of wheat, rye, millet, oat, and possibly barley. Also, several of the bread-like products contained club-rush tubers (the root of a reed-like plant). Bread made purely from such tubers is very crumbly, since the plants do not contain gluten. By mixing the tubers with cereal grains, it enabled the Natufian cooks to combine a nutritious, common food like club-rush tubers, with the glutenous cereals, resulting in something more like a dough that holds together while cooking.
Now to the last part of the question, which came first and do we all agree about it. As it stands, the evidence for bread-like products appears to be slightly older than the evidence for beer (by a few centuries at least). However, both bread and beer were found in pre-agricultural Natufian sites, suggesting that they are probably both the result of experimenting with methods of food processing and preservation that were happening at the same time. I would not at all be shocked to read a paper showing beer to be slightly older than bread. Essentially, they both were created at roughly the same time by employing similar types of plant inputs to particular applications of food processing and storage. As for consensus, I think most archaeologists would accept the methodologies and conclusions presented in these studies. Though, I am sure some will disagree with some aspect of the study and try to prove them wrong. But this is how knowledge is produced, so the lack of "consensus" is not a bad thing, but rather room for future knowledge to be produced.
Arranz-Otaegui, Amaia, Lara Gonzalez Carretero, Monica N. Ramsey, Dorian Q. Fuller, and Tobias Richter
2018 Archaeobotanical evidence reveals the origins of bread 14,400 years ago in northeastern Jordan. Proceedings of the National Academy of Sciences of the United States of America PNAS 115(31):7925-7930.
Liu, Li, Jiajing Wang, Danny Rosenberg, Hao Zhao, György Lengyel, and Dani Nadel
2018 Fermented beverage and food storage in 13,000 y-old stone mortars at Raqefet Cave, Israel: Investigating Natufian ritual feasting. Journal of Archaeological Science: Reports 21: 783-793.
edit: fixed some dates