Like Scotty said, everyone knows of a guitar player who can play a bizillion songs from other bands, but has no idea how or where that band's music fits into the grand scheme of music. Consequently, that player is like a deer caught in the headlights when he or she is in a situation that calls for some form of improvization.
And everyone know of a guitar player who can play a bizillion complex scales, arpeggios, chords, etc..., one who knows a lot about theory but has no idea how to use those tools to create a melody, entertain an audience, compose a solo that fits into a song, or enhance the performance of the other musicians in the band around him or her.
The point is that there really is no debate. You need to learn theory AND you need to learn songs. One without the other leaves a serious gap in your ability to play your instrument. More importantly, it leaves a gap in your ability to play your instrument with other musicians.
:cool: