Depends on the factory and what you're doing there. Last time I worked in a factory I was debugging printer-eating robots, shooting high powered lasers at things, and blowing stuff around with blasts of compressed air. (And I got to program all those things).
You haven't really debugged things until your tests involve forklifts and 10t cranes. O:-)
Fortunately people are working to make that kind of thing less necessary (though it can't be eliminated completely of course; someone still needs to watch and maintain the machines).
I mean, this isn't completely unsolvable--better AC would've made things better. But it probably wouldn't be that economical, because industries like that are rather price sensitive.
You haven't really debugged things until your tests involve forklifts and 10t cranes. O:-)