I'd like some elaboration on that. I failed to find a source.
Surely the principia and similar efforts will still yield useful results even if they cannot necessarily prove every true statement from the axioms?
Also Russel himself ruined the cathedral of Frege with its eponymous paradox, he was clearly among the best to understand how a thing like Godel's incompleteness theorem could come along the way.
And for his relation to madness, his personal life have been felt with many turmoil from an early age. If anything it seems that mathematics saved him, preventing his early desire for suicide.
https://plato.stanford.edu/entries/neutral-monism/
https://en.wikipedia.org/wiki/Copleston%E2%80%93Russell_deba...
So the Java IDE had been able to recognize an infinite loop of the kind you wrote by an algorithm, that can be proven to be correct for a limited class.
On the other hand, you can loop infinitely deciding to exit on the return value of opaque calls to some entity external to your analyzer, and your IDE shouldn't be able to catch that.