A problem is defining what is "philosophy".
The Babylonians had a tradition of posing questions about the world and themselves, answering in rational terms, which may easily qualify under a reasonable notion of "philosophy". They had also a pretty strong tradition of putting those discussion in dialogue form, which was an extremely successful device, to be found again in Hellenic philosophy and its derivates (I am not necessarily arguing for the Greeks borrowing the device, however - it's fairly straightforward and also found abundantly in India).
They had rather impressive astronomy, well-developed medicine and more than decent mathematics, all of which would indeed pass on to the Greeks alongside Egyptian progresses (Egypt had more advanced medicine, not sure about the comparative strengths in other areas - I'm under the impression Babylonians had better maths).
IOTL, the Babylonian "phylosophical" discussions centered around waht we could call the problem of evil and divine justice relative to human behaviour: where is reward for the righteous? And who is "righteous" anyway? What is all this suffering for? And if gods are just, why are suffering? (If all this sounds familiar, it's because it is - the so-called Sapiential books of the Bible, largely composed during or after the Captivity, reflect many of the same concerns, particularly apparent in Job and Qohelet).
So, at the very least, they had a discursive tradition of rationally debating ethics.
This appears particularly during the Kassite age (as the quoted Dialogue of Pessimism).
In other respects, however, Babylonian worldviews remained largely mythical. Their ethical discussions did not relate to either their physics or "metaphysics" (actually theology) in any systematic way. They widely accepted idea of corresponding levels at the various planes of reality (stars, individual lives, physical appearences and sacrifice's entrails being signs of each other, for instance) remained at an operative level, without theoretical formalization (that would come in Hellenistic times AFAIK) and was not subjected to much rational scrutinity in the sources I know of.
Even in ethics, such of the "Wisdom" and "Advice" literature is normative, expressing proverbs and maxims of proper conduct rather than questioning what proper conduct IS.
So, for a given value of "philosophy", it certainly existed in ancient Babylon, but it was relatively limited. I would say that the prevailing socio-economical conditions were rarely conducive to further developments. The literate class was economically dependent from the palace or, more often, the temple, and neither institution had much patience for intellectual dissent (or dissent in general). Independent schools did not exist, and the instruction systems was heavily oriented toward tradition, partly because of the requirements of the future employers (palace and temple again, who needed reliable adminstrators) partly because of the nature of the writing system (and the need to learn Sumerian in order to master it).