I've been doing exactly what you suggest, but was hoping there was a more "elegant" way. I may be mis-rememberingIf your code is assigning an undesired value at a certain point, can you not, for debugging purposes, immediately reassign the desired value? Or, before other code which tests or uses the value, change it to what you want.
I use the simulator a lot, and forcing the values in test code seems to be a significant part of the process.
Ah Ha! If I right click on an input pin on the simulator chip outline, I can assign a "sticky" value for a measured byte. It does indeed over-ride the default code value. For example, in the case of a simulated DS18B20 temperature measurement, the simulator defaults to 128 (zero centigrade), but right clicking the appropriate pin allows assigning any arbitrary positive " default temperature".There is no way to do that and I am sure PE5 never had it either.
Two possible solutions would be to comment out code which sets the variable, or add a line to force the variable to be set to a specific value before the part of the code you are seeking to test.
Probably because I didn't explain it very well. It may also be a unique over-ride for hard coded variables for the "readtemp" command? In any case, it lets me set the temperature on the fly in the simulator, so may be of value to others.What you are doing there is specifying what the value read will be when an 'input' or 'read' command is executed for that pin. It won't override the value in the variable elsewhere, but it will set it to the pin value specified whenever the input read is executed.
I hadn't worked out what you needed but glad you found it.