I have a syntax error in write-file.go
├── go.mod
└── write-file
└── write-file.go
I run write-file.go via shift-F9, and see this output in vscode:
Starting: /home/guettli/go/bin/dlv dap --check-go-version=false --listen=127.0.0.1:42097 --log-dest=3 from /home/guettli/projects/hello-go/write-file
DAP server listening at: 127.0.0.1:42097
Build Error: go build -o /home/guettli/projects/hello-go/write-file/__debug_bin -gcflags all=-N -l .
# exampe.com/hello/write-file
./write-file.go:7:29: cannot use "üöä" (untyped string constant) as []byte value in argument to os.WriteFile (exit status 2)
I click on ./write-file.go:7:29:
to jump to this location, but vscode does not find this file.
I guess the current-working-directory of vscode is the parent directory of write-file
.
Is this a bug, feature or am I doing something wrong?
I want to be able to click on build error messages and jump to the corresponding line.
The error (cannot use "üöä" (untyped string constant) as []byte value) is just an example and not relavant for this question.