Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

“Run without debugging” unable to run on macOs when used gomod. #3121

@wzh90

Description

@wzh90

What version of Go, VS Code & VS Code Go extension are you using?

  • Run go version to get version of Go
    • go1.14
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders
    • 1.43.1
  • Check your installed extensions to get the version of the VS Code Go extension
    • 0.31.1
  • Run go env GOOS GOARCH to get the operating system and processor architecture details
    • darwin/amd64

Share the Go related settings you have added/edited

{
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"git.enabled": false,
"window.zoomLevel": 0,
"workbench.iconTheme": "vscode-icons",
"editor.defaultFormatter": "ms-vscode.Go",
"go.autocompleteUnimportedPackages": true,
"extensions.ignoreRecommendations": false,
"go.docsTool": "gogetdoc",
"go.useLanguageServer": true
}

“Start debugging” can run ,but “Run without debugging” unable to run on macOs when used gomod.

log:
Verbose logs are written to:
/var/folders/5v/f083s3c147b8xhll1wng2_8m0000gq/T/vscode-go-debug.txt
InitializeRequest
InitializeResponse
Using GOPATH: /Users/fish/Documents/code/go_path
../../../../code/go_workspace/ro/main.go:5:2: package ro/local is not in GOROOT (/usr/local/go/src/ro/local)
Process exiting with code: 1
Sending TerminatedEvent as delve is closed
DisconnectRequest
DisconnectRequest to parent

My code:
p

Please check it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions