Issue
Is it possible to create some sort of "trace breakpoint" in eclipse whereby Eclipse will log variables that I choose to a file when a "breakpoint" is hit without pausing the application?
Solution
public static void logArgs(final String one, final String two) {
System.out.println(one + two);
}
put your breakpoint in it, right click it and edit Breakpoint properties...
as in the example. The important checkboxes are Conditional
and Suspend when 'true'
. Just return false
so that breakpoint does not suspend at all.
java.io.FileWriter w = new java.io.FileWriter("/tmp/file.txt", true);
w.write(String.format("args(%s, %s)%n"), one, two));
w.close();
return false;
Answered By - MichaĆ Grzejszczak
Answer Checked By - Willingham (JavaFixing Volunteer)