<...snip...>
If you are the lead instrument playing a solo based on what the rest of a popular band is playing, there is no time to be thinking about theory, what scale will fit, or what mode you want to use.<...>
That is what practice is for.
When learning a new, challenging song, I analyze it first. Then I try a few things out because I can often analyze it more than one way, or analyze it erroneously. Depends on the song.
I have practiced scales, arpeggios, and other basics until they are under my fingers. If I know the key center of the part of the song I'm in, what I hear in my mind is immediately transferred into my fingers. I don't know how that is done.
In fact, I don't even hear it in my mind first, I hear it as I'm playing it. Like I said, I don't know how that happens.
On the gig, 99% of the playing is done without thinking. No words are thought. It's just a flow. Analyzing is all done in practice sessions. On stage, the object is to get into “the zone” and have fun.
Even though I play pop music for a living, and most of it isn't very challenging theory wise, my theory knowledge makes me a better player than I would have been if I hadn't learned it.
IMO, every musician and even every singer should learn at least basic music theory.
Insights and incites by Notes ♫