If you want to set the environment variables to some static values, simply select “Use a custom GDB executable” on the Debug Settings page in VisualGDB Project Properties and specify the environment variables there.
If you want to do some computations and set the variables based on those, create an executable shell script (e.g. run-gdb.sh) that will set the necessary variables and then invoke gdb with the command line arguments passed to the script, e.g.:
export A=B
gdb $@
Then specify the location of that script file in the “GDB Debugger Executable” field in custom GDB settings editor.