Need helping using GMT with Virtual Studio Code

Hi, so I have downloaded GMT 6 and git bash on my windows computer. I am able to create.sh files and use GMT separately on the Git Bash terminal and it works very well. However, I recently downloaded Virtual Studio Code as an easier editor for coding. I can use Git Bash as a separate terminal in there but when I run my GMT files, it gives the error “line X: gmt: command not found” for every GMT command used. I understand this is a problem with VSC not detecting GMT or its command-line arguments but I’m lost on how to fix this problem. Any help would be greatly appreciated.

Hi @Roshlion, welcome to the community! I do not have an exact answer to your solution, but many times when this error comes up it is because of issues with finding the GMT session (see https://docs.generic-mapping-tools.org/latest/begin.html#note-on-unix-shells).

1 Like

Could you share a screen capture of VSC with the error and the script?

1 Like