The chocolate chip cookie was accidentally developed by Ruth Graves Wakefield in 1930. She owned the Toll House Inn, in Whitman, Massachusetts, a very popular restaurant that featured home cooking in the 1930s. Her cookbook, Toll House Tried and True Recipes, was published in 1936 by M. Barrows & Company, New York. It included the recipe "Toll House Chocolate Crunch Cookie", which rapidly became a favorite to be baked in American homes. * Wakefield is said to have been making chocolate cookies and on running out of regular baker's chocolate, substituted broken pieces of semi-sweet chocolate from Nestle thinking that they would melt and mix into the batter. They did not and the chocolate chip cookie was born. Wakefield sold the recipe to Nestle in exchange for a lifetime supply of chocolate chips. Every bag of Nestle chocolate chips sold in North America has a variation (butter vs. margarine is now a stated option) of her original recipe printed on the back.
They were actual invented by mistake. There was woman (name unknown) who owned a bakery and made a butter cookie with melted chocolate chips in it. She had a business person coming to try her cookies and she was running late so she put the chocolate chips in the batter before melting them thinking that they would melt in the oven. When they were done baking the chocolate chips had not melted. She didn't have time to bake a ne batch so she served them anyways. That's where chocolate chip cookies came from :)