VS Code(1.66.2) Setting Up python interpreter path
I opened up my VS code to work on new story for my current project. After writing few line of python code I pressed F5 to debug the program and all of a sudden got surprised with “The Python path in your debug configuration is invalid” error.
I was surprised as a day before everything was working fine, in initial troubleshoot I figured out that it is not able to find my python install path. Quick googling about it told me that we do set it up in settings.json to tell the VS code about default interpreter path, which seems like I had already done in my settings.json file earlier during the setup.
A little more research and I found out that my VS code version have been updated recently to 1.66.2 version, which seems to be no longer recognize “python.pythonPath” configuration in settings.json file. After checking out few more things finally I found the configuration for pythonPath in newer version of VS code. We need to use “python.defaultInterpreterPath” now to set the default location of the python interpreter.
After making the above change I had to restart the VS code and voila I was able to debug my python program again :).