-
Notifications
You must be signed in to change notification settings - Fork 645
Not able to debug/launch Go programs #1194
Comments
We did update the way GOPATH was used in the debugger. In your debug configuration in |
It is one level below src, $GOPATH/src/mymain. Where mymain contains the main go program. This is used to work before the extension update. Is there a way to install the previous version of this extension so this issue can be isolated to this extension update. I also tried setting the GOPATH in the env map in launch.json but it results in the same thing. |
This is the previous release: https://github.com/Microsoft/vscode-go/releases/tag/0.6.63 I can reproduce your error by having my package directly under the $GOPATH without the Nevertheless, I have the fix for case I was able to repro. Do you mind seeing if it fixes your issue as well? You will need to download https://github.com/Microsoft/vscode-go/blob/master/Go-latest.vsix and then run |
@karamana I had issues with the new release so I uninstalled the extension and installed version 0.6.63 from a vsix file after disabling extension auto updating and everything is working again. |
Yes I can confirm that the issue does not happen in release 0.6.63 and
happens in 0.6.64
…On Tue, Sep 5, 2017 at 6:36 PM, Ramya Rao ***@***.***> wrote:
@karamana <https://github.com/karamana> Is debugging the only feature
broken for you or like @nais777 <https://github.com/nais777> all the
features are broken?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1194 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAVCI8rFA4BEuzq6uj7sJ_TGfRU5ssBRks5sffcDgaJpZM4PNtGU>
.
--
Vijay
|
@karamana Are the other features of the extension like auto-complete, go to definition etc working as expected? I have a fix in for GOPATH issue with the debugger. Can you try it out? You will need to download https://github.com/Microsoft/vscode-go/blob/master/Go-latest.vsix and then run |
Thank you. This question has been bothering me for a long time. I have solved the problem after installing go-latest.vsix |
Yes other features like auto-complete, go to definition etc are working.
Your latest changes seem to work. I also tried adding breakpoint, which
worked too.
…On Tue, Sep 5, 2017 at 9:14 PM, Ramya Rao ***@***.***> wrote:
@karamana <https://github.com/karamana> Are the other features of the
extension like auto-complete, go to definition etc working as expected?
I have a fix in for GOPATH issue with the debugger. Can you try it out?
You will need to download https://github.com/Microsoft/
vscode-go/blob/master/Go-latest.vsix and then run code
--install-extension Go-latest.vsix from the location where you downloaded
that file.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1194 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAVCIyWoHs7mA_S173dYGJTEyPw_vOy8ks5sfhwSgaJpZM4PNtGU>
.
--
Vijay
|
Thanks for quickly resolving this.
…On Tue, Sep 5, 2017 at 9:22 PM, Vijay Kumar ***@***.***> wrote:
Yes other features like auto-complete, go to definition etc are working.
Your latest changes seem to work. I also tried adding breakpoint, which
worked too.
On Tue, Sep 5, 2017 at 9:14 PM, Ramya Rao ***@***.***>
wrote:
> @karamana <https://github.com/karamana> Are the other features of the
> extension like auto-complete, go to definition etc working as expected?
>
> I have a fix in for GOPATH issue with the debugger. Can you try it out?
>
> You will need to download https://github.com/Microsoft/v
> scode-go/blob/master/Go-latest.vsix and then run code
> --install-extension Go-latest.vsix from the location where you
> downloaded that file.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#1194 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AAVCIyWoHs7mA_S173dYGJTEyPw_vOy8ks5sfhwSgaJpZM4PNtGU>
> .
>
--
Vijay
--
Vijay
|
That's good to hear @karamana
Is the value there a prefix for the value in the |
Thanks Ramya, your fix has saved a whole lot of time. |
The value of GOPATH is a prefix of the "program" attribute.
The value of GOPATH + "/src" is a prefix of the "program" attribute.
The "program" attribute is set to "${workspaceRoot}/src/mymain"
GOPATH is set to the actual value of $workspaceRoot
When do you plan to officially release the fix (with a new version number)?
…On Tue, Sep 5, 2017 at 11:11 PM, Ramya Rao ***@***.***> wrote:
That's good to hear @karamana <https://github.com/karamana>
If you don't mind can you check a few things for me?
- Set trace to "verbose" in your debug configuration
- Start debugging, you will see verbose logging in the debug console
- There will be a line Using GOPATH:
Is the value there a prefix for the value in the program attribute in the
debug configuration?
Is the value there + /src a prefix for the value in the program attribute
in the debug configuration?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1194 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAVCI-Ysg1RXGXK5wRnxj3KgXc8lOL4wks5sfjeogaJpZM4PNtGU>
.
--
Vijay
|
Thanks @karamana, I'll release it by end of day today. |
The fix for this issue has been released with the latest update to the Go extension (0.6.65) |
Hi Ramya Verbose Debug OutputVerbose logs are written to: |
@rajkrishnamurthy Can you share the debug configuration from the launch.json file? |
Hi Ramya Go version: 1.8.3
} |
Hi Ramya,
I use Go heavily in my development. Recently when I had to use CGo on
Windows I ran into issues with compiling and linking with VSCode. This is
because Go is compiled with MingW instead of Visual Studio tools on
Windows. Are there any efforts inside of Microsoft to use VS to compile Go
so everyone can benefit.
Apologize if I should have posted this question to a different audience. In
which case please direct me to the right person(s).
Thanks,
Vijay.
…On Tue, Sep 19, 2017 at 11:05 AM, Raj Krishnamurthy < ***@***.***> wrote:
Hi Ramya
Sorry for the delay.
Once I set the GOLANG path, the problem went away., However, I never set
the path variable prior to 0.6..65 upgrade.
Thanks very much.
Go version: 1.8.3
---launch.json---
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "go",
"request": "launch",
"mode": "debug",
"remotePath": "",
"port": 2345,
"host": "127.0.0.1",
"program": "${fileDirname}",
"trace": "verbose",
"env": {},
"args": [],
"showLog": true
}
]
}
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1194 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAVCI4XsRKyn__NwPrDspH1vdLhXP8SKks5skAKCgaJpZM4PNtGU>
.
--
Vijay
|
@karamana Which VS Tools are you referring to? |
VC++ compiler
…On Mon, Sep 25, 2017 at 12:45 PM, Ramya Rao ***@***.***> wrote:
@karamana <https://github.com/karamana> Which VS Tools are you referring
to?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1194 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAVCI6X5AODZdkJBGE_sUZEOq7jG16GBks5smALhgaJpZM4PNtGU>
.
--
Vijay
|
Am sorry, I dont do a lot of Go coding myself, so I wont be much of help here. |
From @karamana on September 6, 2017 0:51
go: GOPATH entry is relative; must be absolute path: "undefined".
For more details see: 'go help gopath'
exit status 2
Process exiting with code: 1
GOPATH is set in the environment correctly. This has worked for the past 2 months so something has changed today (Spet/5/2017) with an extension possibly.
(2 theme extensions excluded)
Steps to Reproduce:
Reproduces without extensions: Yes/No
Copied from original issue: microsoft/vscode#33867
The text was updated successfully, but these errors were encountered: