VS code debuggers start a new shell each time, so even if you write all the commands in the same shell, as soon as it runs with debug set to true all env variables are reset.