The best source I have that actually does the homework necessary to trace the historical timeline of Luther's theology as well as the timing of its appearance into the world at large is in well written and accurate book entitled, 'MARTIN LUTHER’S THEOLOGY Its Historical and Systematic Development by BERNHARD LOHSE'
In answering your question I only need to provide a high level summary from this book and if you want the longer story I recommend that it be purchased.
In this book it had a historical timeline part and a theological development part. In the historical part the first steps of little Luther are found in his scribbles and noted in his own studies of St. Augustine as well as the scholastic works of Peter Lombard (a kind if standard theological text-book of his day) which he had not as yet made a full break away from. In a nutshell Luther kept scholastic norms, did not yet develop his doctrines but at the same time showed signs of understanding the nature of sin more towards an Augustinian view and more towards the Apostle Paul's view, avoiding the scholastic ways of defining sin and preferring Paul's own language which seemed to make more sense to Luther and seemed to side with Augustine as opposed to Lombard.
In these early years, before it would appear that Luther was clearly and without doubt a Christian believer (as judged by a modern day evangelical standard) he yet starts to begin in a lot of criticism against the theology of his day.
Luther repeatedly attacked the philosophy, evidently having in mind the extensive significance of Aristotelian philosophy for scholastic theology.13 Aristotle was a “chatterbox.” .....Luther engaged in comprehensive criticism not only of the theology of his day but also of the church and of particular aspects of church life. He reproached his contemporaries for holding the truth down in superstition, that is, in foolish and idle observatio, or in a superfluous, indeed, false, religio, like stupid old wives. While they wanted to be ever so “religious,” they were superstitious, as is evident in the sacrament of extreme unction.28 At this point as well as at many others in his marginal notes, Luther’s criticism could be interpreted of the Observantes, that is, of those in his own order who adhered to strict observance of the rules, thus not in any general terms. (P47-50)
We should make it clear though although Luther showed signs of rejecting philosophy and self-righteousness as well as beginning to understand a more radical sense of sinfulness he had not yet expressed the concept of justification by faith in his marginal notes of 1509/1510.
The next traceable stage of Luther in history is found in a series of lectures on the Psalms and a fairly new Christological hermeneutic which he began to trace (1513–1515). In short Luther still did not break out in clear justification by faith teaching as a single event, but did more and more refuse to use any traditional distinctions about different types of graces while focussing more and more in the concept that Christ is the only source of forgiveness and all men are sinners, leaving little interest in other subjects. While taking this spiritual approach to the Psalms he even avoided almost all talk about sacraments, which would have otherwise been woven into the subjects by his contemporaries. Regarding criticism of the papacy he said not much and did not seem to suspect any great conflict with the Pope. However he did show serious signs of criticism of any religious person, including his own contemporaries who thought a strict following of rules would justify a person. Rather faith to Luther at this time was almost synonymous with humility, by confessing that we are sinners we glorify God and his judgment.
Just like the Jews or the heretics, the observants were “much too holy,” trusting more in their merits than in the Word of the Lord. At times Luther could warn against works in any form and emphasize that everything depends on the imitatio Christi through faith and hope in him. Ignoring the works of Christ results in the many deeds that people believe they must perform themselves. (page 55)
To the point though all of this is a rumbling of a future change not the change itself. Luther did not yet attack the Papacy and did not yet teach the doctrine of justification by faith through an external righteousness occurring in one moment and lasting through to eternity apart from the moral works of the law. The study of the Psalms seemed to basically coincide with Luther's greater sense of his sinfulness and the need of confession to God without much interest in external forms of religion of the sacraments. Yet he may have already had his Tower Experience around this time as is so evident in his next set of studies for his Lectures on Romans (1515/1516), Galatians (1516/1517), and Hebrews (1517/1518). What Luther historians know about his thought at this time is not the well developed post reformation thoughts laid out in his published commentaries available today but in notes recorded by his students. But clearly during his lectures on Romans he had mention all the basic concepts of original sin and an un-polished version of justification by faith. Luther therefore attacked indulgences in (1517/1518) after he had already developed core doctrines that would be the cause of separating him far from the papacy.
Once the conflict was unleashed, if you read Luther's own account of the events, he seemed to be partly naive in how swiftly the Pope and papacy would oppose him. In the back of his mind it almost seemed Luther thought he might be able to have is faith while remaining in the Catholic church and that the Pope would quietly tolerate him and he the Pope. However, once he realized that the Pope would not allow what he considered essential Christian faith, he then realized that the Pope was actually an antiChrist and the two could never be reconciled.
In conclusion Luther was inwardly wrestling with two main ideas, original sin and justification by faith. This is what separated him from the Catholic church. However the attack on something less important, triggered the comparison of beliefs and mad evident how impossible it was to have unity with these differences. this ultimately led the Pope to denounce Luther which in turn made Luther realize he must denounce the Pope.
For illustration here is quote from his letter To John von Staupitz on May 30, 1518. He is trying to avoid conflict with the Pope as his 95 Thesis was meant to trigger a debate not to throw himself into danger and potential death as a heretic.
And so I am asking you to receive this poor writing of mine and to forward it with whatever speed is available to you to our excellent Pope Leo X, so that it may serve me there as an advocate, so to speak, in the face of the contrivings of the evilminded. I ask this not because I want to get you involved in my danger; I prefer to take all the risk myself. Christ will know whether my words are his or my own. Without Christ’s command not even a pope can speak, nor is the heart of a king in his own hand.23 This Christ is the judge whose verdict I am awaiting through the Roman See. (Luther's Works Volume 48, page 70)
As is noted by the Editor of Luther's works on this passage:
When Luther made this statement he obviously was still willing to acknowledge the authority of the Papal See. In the following months his view underwent a rapid change until, during the Leipzig Disputation, 1519 (see p. 126), he challenged this authority and made acceptance of any papal verdict dependent upon its agreement with Scripture. See also p. 74, n. 7; pp. 88 f.