VS Code activates the environment automatically when you use Terminal. Read the documentation for more information. I had the same question, now i find the answer https://code.visualstudio.com/docs/python/tutorial-flask