What is the last IDE that runs in windows XP? Thanks very much
I think you should be able to use the latest IDE version. The only XP related issue I know of occurred in Arduino IDE 1.6.x versions and have since been fixed.
The issue with XP I thought arrived somewhere in the 1.5.x versions - it was a problem with the linker that caused it to fail at the linking stage when compiling some (but not all) sketches. This was resolved in 1.8.2 or 1.8.3 after the same problem also began manifesting on the Windows Store version of the IDE, which was felt to be a priority (while making it work on XP was not); as a happy consequence of this, the latest version of the IDE now works again on XP.
I just tried 1.8.5 on my XP VM, and it seems to work fine.