Environment variables saving not working

Hello.
I experience problem with persisting values of variables in environment and globals.
I manually added new variable in environment ‘MyVar’ and set value (initial and current) to ‘MyVarVal’ (and clicked button ‘Save’).
And in script I have following code:

  • let myVar = pm.environment.get(“MyVar”);
  • console.log("MyVar: ", myVar);
    But in console i see: ‘MyVar: undefined’.

The same behavior I register in case of Globals variables.

Where could be problem? What do I wrong?

Thank you for helpful advice.

Do you have the Environment selected?

Yes, of couse.
I think there must be bug in the behavior. It I set the variable using scipt (pm.environment.set(‘any value’)) then is the value used.
But it isn’t reflected in UI. So it looks like a bug in UI.