I am debugging a Java program in Eclipse. I would like to watch a specific variable. However, since my program uses a GUI, creating a breakpoint causes the window to freeze. This is particularly annoying when e.g. trying to right click on an item and navigate a context menu.
I don't actually want to stop the program, I just want to watch a specific variable and log its value every time a certain line is reached. At the moment, I am doing that with print statements, but I was wondering whether there was a way to do this using the debug view.
(Note: I don't want to write this to a log file. This is not a variable I need to look at long term. At the moment I just print it out, look at the values it takes on, and then delete the print statement. It would be nice to have something like this which I can keep in the debug view without having print / log statements cluttering my code).