A
A
Ao2021-05-20 17:44:22
go
Ao, 2021-05-20 17:44:22

How to set up VSCode for go?

How to configure vscode to work with GO so that the binary file does not go to C:\Users\UserName\AppData\Local\Temp
but to the specified folder

{

    "version": "0.2.0",
    "configurations": [
        {            
            "name": "ioserver",
            "type": "go",
            "request": "launch",
            "mode": "debug",
            "program": "${fileDirname}",
            "output": "C:\\GoProjects\\",
            "cwd": "C:\\GoProjects\\",
            "remotePath": "${workspaceFolder}",
          
        }
    ]
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya, 2021-05-23
@hugga

You can override the $TEMP$ environment variable.
Or maybe it will be easier for you to run files through the command go build -o "path", which will save the binary to the path you specify. Or just go buildsave to the current folder

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question