Hello,
I'm sorry that you're running into this. Our core engineering team
has noticed a recent spate of 502 errors in our Production services,
and are taking steps to isolate and resolve the problem.
502 "Bad Gateway" errors are most common in our environment when one
of our backend servers has trouble communicating with another internal
server, and is normally not something that you as an end user can do
to avoid. There shouldn't be any connection to whether you're running
your code in the debugger or not, though if you code hits a different
set of backend servers in between calls you may or may not see the
errors.
I'll update the thread with more information when I have it.
Cheers,
-Jeff Posnick, AdWords API Team