-
Notifications
You must be signed in to change notification settings - Fork 645
Directory named 'go' in path results in EACCES error #585
Comments
fs.accessSync would still not help in differentiating file vs directory. Will use fs.statSync instead |
Thank you! |
The latest update (0.6.48) has the fix. |
Sorry, I am still facing same issue to debug my application with Delve |
@jeffmcaffer Can you share the complete error message you are seeing? |
@ramya-rao-a for sure.
|
Thanks @jeffprestes, and can you confirm that the rest of the Go extension features work for you? And is cc @roblourens for thoughts on the callstack related to debugging |
Except for debug, coding Go using vscode in my machine is great! It's an amazing tool. We just need to fix this to become perfect! |
The "Unable to display threads" is coming from https://github.com/Microsoft/vscode-go/blob/master/src/debugAdapter/goDebug.ts#L440 when try to get list of goroutines from delve. @roblourens Is Delve is failing to return the list of goroutines and giving the error EACCES error. Are you able to execute the Have you set |
|
Actually if you have stopOnEntry enabled, it would be sent very early, do you? |
Hi @ramya-rao-a , Have you set go.goroot in your settings to anything that is different than the default by any chance?
I could be wrong but EACCES error is related to Javascript. But I can be wrong. About Delve in my machine, at command line it is running sweet. See the logs below.
Oh! Could I give a suggestion? In order to help you and @roblourens to reproduce the error, I'd suggest you to get a Mac, setup the Go Dev development environment and try this: http://nanxiao.me/en/a-brief-intro-of-delve/ and this https://blog.gopheracademy.com/advent-2015/debugging-with-delve/ tutorials. If you were able to run the debug process in your machines within vscode, please let me know and share a print screen. Then I would start to consider that is something wrong in my machine not in the vscode. I believe this is help you to speed up the fix processing ;) And again, I appreciate your efforts to fix this and give to Go Dev community this important tool. I will be waiting for your news. Thanks a lot! |
Why did the 'next' request fail? That seems relevant. Also, what version of MacOS do you have? I haven't used it on a Mac in awhile since Delve was broken on 10.12.x, but it looks like it's usable now, so I can try that out this week: https://github.com/aaronhackney/delve_on_mac |
Rob,
Please, read what I have written correctly, I didn't say 'next' is not
working. Delve is working fine. Again, Delve is working fine. Check the
logs out.
I can debug my Go application without VSCode with no problem.
What I am trying to do is helping you to create a better IDE but if you
don't care about Go Developers that use Mac, OK, I won't spend my time
trying to convince you.
- Jeff Prestes
Em 23 de jan de 2017 3:12 PM, "Rob Lourens" <[email protected]>
escreveu:
… Why did the 'next' request fail? That seems relevant. Also, what version
of MacOS do you have? I haven't used it on a Mac in awhile since Delve was
broken on 10.12.x, but it looks like it's usable now, so I can try that out
this week: https://github.com/aaronhackney/delve_on_mac
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#585 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAgjWQAd_UlM1mFfW7aDWbyFslv7RO_Bks5rVN9egaJpZM4Kkgjq>
.
|
You said it worked but the log says
which seems wrong, doesn't it? And since the extension does nothing but pass requests on to delve, we want to understand the behavior of Delve here. I don't doubt that there's an issue, and thanks for helping us understand it. |
I am using Mac and have installed delve using brew. I am able to hit breakpoints, step in, step out etc in VS Code using the Go extension
Yes, that is a possibility, in which case my bet is on https://github.com/Microsoft/vscode-go/blob/master/src/debugAdapter/goDebug.ts#L214 where we spawn a new process to start delve.
The extension is able to find the the Can you think of any reason, why the folder where the dlv binary resides is not accessible to VS Code? Please try the following, it will help us narrow down the root cause.
The reason I am asking these questions is because GOPATH, PATH and GOROOT (in that order) are used by the Go extension to find |
Hello @ramya-rao-a, Below are my answers to your questions. I have changed my username for security reasons but it won't be a problem to you understand my dev environment.
Below the results:
VSCode:
Thanks again. I appreciate your kindness. |
The Go extension first looks at GOPATH and then the PATH to find the dlv binary. If not, then I am truly stumped :( To set up a dev instance of the Go extension read this. |
That was it. Accidentally, I had a dlv file at $GOPATH/bin, I removed it and now vscode is debugging like a charm. Thank you very much @ramya-rao-a for all your attention and kindness. Now I have one more reason to say to Go devs to use vscode instead of vim ;) |
phew! Glad that worked out. Happy Coding! |
Maybe this will assist someone if they have the issue. I had the same error popping up as well. Two computers, same version of vscode ( |
In
getBinPathFromEnvVar
the code returns the first path that exists, regardless of permission. If that path is a directory namedgo
and not an executable, the code will attempt to executego version
on the directory. This results in:error spawn eacces
Line of code in question: https://github.com/Microsoft/vscode-go/blob/master/src/goPath.ts#L24
Fix: I'm not too familiar with node, but checking the docs, I think this can be fixed by using the fs.accessSync method.
Workaround: Re-order your path, so the go executable is found before the directory.
The text was updated successfully, but these errors were encountered: