-
Notifications
You must be signed in to change notification settings - Fork 646
Does vscode-go support debug go code using go plugin? #3048
Comments
@morningspace does the program run without an error if you build/run the program outside vscode, and debug directly using golang/go#27751 (which uses module) and many others linked from there. |
@hyangah Thanks for your prompt help... to try outside vscode and debug directly using |
In my case, |
Hi, I've managed to make it work after reading this. So, it's not an issue of @jdu-mydevices You can have a try. I'd be happy to close this issue if that works for others. |
Glad you were able to resolve the issue, @morningspace. @jdu-mydevices: Please file a new issue if your problem persists. I'll go ahead and close this one. Thanks! |
- We have to compile the plugins also with the -gcflags='all=-N -l' according to this issue microsoft/vscode-go#3048 (comment)
Please answer these questions before submitting your issue. Thanks!
What version of Go, VS Code & VS Code Go extension are you using?
go version
to get version of Gocode -v
orcode-insiders -v
to get version of VS Code or VS Code Insidersgo env GOOS GOARCH
to get the operating system and processor arhcitecture detailsShare the Go related settings you have added/edited
Run
Preferences: Open Settings (JSON)
command to open your settings.json file.Share all the settings with the
go.
or["go"]
prefixes.{
"terminal.integrated.shell.osx": "/bin/bash",
"go.useLanguageServer": true,
"window.zoomLevel": -1,
}
Describe the bug
I have a module built by go plugin. And I want to load the plugin in my main module, and debug the main code in vscode using go extension.
However, I can always see below error when it goes to the line to load the plugin using
plugin.Open()
:plugin.Open("/path/to/my/plugin"): plugin was built with a different version of package runtime/internal/sys
While, if I build and run the code outside vscode on the same machine, it works w/o any problem.
As I know, usually, go plugin load failure like this is caused by plugin and main code using different golang release, GOPATH, etc. However, I've checked that they are all the same.
Does vscode-go support debug go code using go plugin? Any idea of how to troubleshoot this issue?
The text was updated successfully, but these errors were encountered: