You can change the values of data items using the Data, Smart Data, Inspector, or Watches windows during the course of your debugging sessions. You can modify program data values during a debugging session as a way to test hypothetical bug fixes during a program run. If you find that a modification fixes a program error, you can exit the debugging session, fix your program code accordingly, and recompile the program to make the fix permanent.
When you modify the value of a variable, the modification is effective for that specific program run only; the changes you make through the Data or Watches windows do not affect your program source code or the compiled program. To make your change permanent, you must modify your program source code in the Source Editor, then recompile your program.
The new value needs to be type-compatible with the variable you want to assign it to. A good rule of thumb is that if the assignment would cause a compile-time or run-time error, it is not a legal modification value.
To modify the value of a variable in the Data window:
Copyright © 1997, 2004, Oracle. All rights reserved.