[Django]-Set GOOGLE_APPLICATION_CREDENTIALS environment variable in VSCode debugger

2👍

You can use launch configurations and set the “env” variable within the configuration specific to your programming language.

https://code.visualstudio.com/docs/editor/debugging#_launch-configurations

👤Siva

2👍

Here is an example

"env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "./secret.do.not.commit/serviceAccountTasks.privateKey.json"
      }

and here is the reference https://code.visualstudio.com/docs/editor/debugging#_launch-configurations

0👍

in Powershell, run

[Environment]::SetEnvironmentVariable("GOOGLE_APPLICATION_CREDENTIALS", "path\serviceAccountTasks.privateKey.json", "User")

This will set then env variable for all processes

👤JAnton

Leave a comment