Home Ask Login Register

Developers Planet

Your answer is one click away!

drJava February 2016

Is there any way to save variable and its values during debugging in intellij?

I am struggling with an error. I cannot find it. Is there a way to compare the debugging results before and after a change in intellij. Other solutions will be also welcomed.

I am explaining my scenario here.

I am debugging a class and at a break point, there are three variables. I named it variableA, variableB and variableC. For example, the debugger stops when the variableA gets its values. At that time, I would like to save the content of variableA. In this way, I can compare the content of variableA before and after the change.


Stephen Couturier February 2016

Would a print statement work? you could use a global counter to keep track of which pass you are at and then compare the values in the consoles.

Bernhard Colby February 2016

I think the only thing, you can do in your case, open all the values of a variable and select all and copy-paste like the Mark pointed out in his comment.

Post Status

Asked in February 2016
Viewed 3,987 times
Voted 10
Answered 2 times


Leave an answer

Quote of the day: live life