Hot code replace in Eclipse

I know, I know! We’ve had a few threads where this was mentioned, but I can’t get it to work in my environment.
Google, in this case, doesn’t care for my friendship :frowning:

I debug…

…and these are my preferences

It sais I’m supposed to get a message if it could not swap the code. Where is this?
When I’m done with my edit, I save and reopen the game window - nothing.

Is there anything else I need to do, other than save after an edit? It there a special console for the code-swap output?

I’m not sure what you mean by reopen, but you shouldn’t have to reopen the window (unless this is the part of the code your changing). All you should have to do is switch back to the game window by clicking it. Also, you will only see the change if the method you made a change to is called again, and the only code that can be switched out is methods (as far as I know) so if your trying to make a change to something else that could be why your not noticing it.

By “reopen”, I meant maximizing.

I’m making changes to my animation loop, which is a while(true), in LWJGL.
I tried adding, removing and changing OpenGL calls, aswell as System.out.print()'s parameters. Nothing happended - no change.

should really work. make sure “build on save” is active of course
but yea sometimes it doesnt work; try clean and build or stuff

Where can I see the output for the code-swapping? Am I using the correct debugging function? What is difference between the run, and the debug?
Why would you need both, instead of just debug?

Where is the “build on save” option, and is it on by default? :slight_smile:

Your help in much appriciated

Hot-swap changes to a method are seen the next time the method is called, so if you have a loop, any change to the code in the same method as the loop won’t be seen til the loop exits and the method returns. Move the body of the loop to another method and hotswap should work.

After a few restarts, it seems to be working. No clue as to why it wouldn’t before, but I won’t complain.
Thank you guys.