1

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 ?

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.