anyone know how to set a String variable to null into netbeans debugger? If I use the variable panel and write null as the variable value it understand the string "null". I tried to completely delete the variable value by pressing canc but it understand the empty string "". How can I set it to null ?
Asked
Active
Viewed 1,947 times
1 Answers
3
As described at How can I change the value of a variable while debugging Java code in NetBeans 7.1?, you can use "Evaluate Expression..." under menu Debug option (Ctrl+F9) and execute code snippets in the window while paused at a breakpoint. For example, type
myStringVariable = null;
then press Ctrl+Enter or click on the green button in the lower right corner of the window to execute that code.