As an academic field, history of science began with the publication of William Whewell's History of the Inductive Sciences (first published in 1837).
What text is the foundation of the study of the history of science?
History of the Inductive Sciences