There are some scholars that believe that the office of praetor predated that of consul in view of the belief that the word praetor has at its root the meaning "to go before" or "to be before", in other words, to have higher rank, or to be the higher ranking official.  The theory then goes that with the expansion of Rome, it became necessary to create an official that had additional powers for purposes of leading the armies and to deal with affairs external to Rome.  In this way the office of consul was created, who then became the official presiding over the senate, while releasing the praetor to concentrate on his duties of overseeing the proper functioning of the courts and administration of justice which was at the heart of Roman society and commerce.

I have, however, only been able to find one source that supports this theory.