Here's a weird thing that seems to work (especially while learning): Instead of copy-pasting code, type it into your program by hand. For some reason this helps a lot when trying to understand or debug the code that you are entering.
This works equally for those of us who started learning using BASIC on 8-bitters, all the way to Python, Java, or odd things like Siemens SCL.
Wrt editors: the times I've taught people, I actually went completely the other way: requiring the first few programs to be written in notepad or nano (depending on OS) . This tends to take the magic out of what the IDE is doing, and makes everything after it much easier.
Both of the above would seem to be relatively time-consuming. But oddly enough in practice they can save more time than they consume.