-
Notifications
You must be signed in to change notification settings - Fork 645
Environment variables undefined during debug. #947
Comments
I tried your code, and I am able to debug through it and no errors. Does Also, can you try using dlv from the command line and see if this works? |
Hi |
In the end i went for gogland IDE. Its not 100% and it has its own glitches but debugging of tests and project itself works ok. |
@AlexShemeshWix Sorry that the Go extension for VS Code didn't work out for you. But before you totally give up on it, would you mind helping us figure out the root cause of your issue? Do you have your env variables set in |
Okay I've been wrangling with the same issue. It looks like it has something to do with the
Note that I'm still on 10.11, not 10.12. main.go package main
import (
"fmt"
"os"
)
func main() {
fmt.Printf("args: %v\n", os.Args)
fmt.Printf("env.TMPDIR: %#v\n", os.Getenv("TMPDIR"))
} Tests Normal go-run:
Default dlv-debug:
Native dlv-debug with
As you can see, the run with The backend flag is documented as follows:
Not sure what to do about it, but I hope this is helpful. |
Possibly related: microsoft/vscode-cpptools#191 |
@xoob Thanks for the detailed investigation! @derekparker |
When using dlv --backend indeed helps.
|
i'm having a similar issue. using fish shell so if the problem is related to shell config i figure i'd be worse off as it lacks full POSIX compliance.
i'd prefer not to switch to gogland if possible so let me know what i can do to help. i'm on sierra 10.12.4 and go version 1.8.1, delve installed via |
Alright, looks like this is a Mac + latest delve issue. I'll update delve and try to get a repro and log an issue for delve |
Awesome 10x |
i reinstalled xcode tools and now it is working for me. might be worth a shot.
|
All my versions are up to date.
…On Wed, May 3, 2017 at 6:41 PM, Chris Mack ***@***.***> wrote:
i reinstalled xcode tools and now it is working for me. might be worth a
shot.
xcode-select --install
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#947 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AVGz1Hby3-TJCE53CURcUCkjo_Cn6e2bks5r2KASgaJpZM4NKKUM>
.
|
@xoob @AlexShemeshWix Did you manually install delve or via brew? I installed via brew in my Mac(10.11.6), and I can confirm I got the latest delve (0.12.2), but it doesn't have the I installed using |
Installed using Ideal fix would be to fix the With 4beecf1 you will be able to set the This will be out in the next update for the Go extension which is in a day or 2. If you are blocked by this issue and cannot wait for the next update of the Go extension, current workaround is to install the stable release of delve via brew using |
The upstream issue has been fixed. Users seeing this issue can either add the new |
Hi
Im on Mac 10.12.4.
VSCode 1.9.0 - Go plugin 0.6.59
GO 1.8.
My program is single file
my launch config is
The probelm
exec.Command(cmdName, cmdArgs...).Output() fails under debugger since git cannot be found
There was an error running git rev-parse command: exec: "git": executable file not found in $PATH
Ive tried to figure out whats wrong so ive tried to print out os.Getenv("PATH") under debugger its empty.
When i run it from command line go run test.go it works ok.
I think i messed up configuration of VSCode but i dont know what it is.
Thanks.
The text was updated successfully, but these errors were encountered: