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.

go.debug.cursor looses build tags #2953

Description

Please direct general questions to:

Please review the Wiki before filing an issue.
Helpful pages include:

Please answer these questions before submitting your issue. Thanks!

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

  • Run go version to get version of Go
    go version go1.12.9 windows/amd64

  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders
    1.41.0
    9579eda04fdb3a9bba2750f15193e5fafe16b959
    x64

  • Check your installed extensions to get the version of the VS Code Go extension
    0.11.9

  • Run go env GOOS GOARCH to get the operating system and processor arhcitecture details
    windows amd64

Share 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.

    "go.testTimeout": "5m",
    "go.enableCodeLens": {
        "references": false,
        "runtest": true,
        "go.delveConfig": {
            "maxStringLen": 128
        }
    },
    "go.delveConfig": {
        "useApiV1": false,
        "dlvLoadConfig": {
            "followPointers": true,
            "maxVariableRecurse": 1,
            "maxStringLen": 600,
            "maxArrayValues": 600,
            "maxStructFields": -1
        }
    },
    "[go]": {
        "editor.snippetSuggestions": "none",
        "editor.formatOnSave": true,
        "editor.codeActionsOnSave": {
            "source.organizeImports": true
        }
    },
    "go.coverOnSingleTest": true,
    "go.installDependenciesWhenBuilding": false,
    "go.testFlags": [
        "-v",
        "-vet=off"
    ],
    "go.buildOnSave": "off",
    "go.useCodeSnippetsOnFunctionSuggest": true,
    "go.useCodeSnippetsOnFunctionSuggestWithoutType": true,
    "go.autocompleteUnimportedPackages": true,
    "go.buildTags": "containers_image_openpgp",
    "go.testTags": "containers_image_openpgp"

Describe the bug

I have bound the "Go: Debug Test at Cursor" command to Ctrl-F9.
I have code with tests, and I position the cursor inside a test function.

When clicking the "debug test" inject above the func line, everything is fine.
When hitting Ctrl-F9, the dlv debugger starts without build tags.

I expect dlv to be called with the same arguments on both ways.

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. See error

Screenshots or recordings

If applicable, add screenshots or recordings to help explain your problem.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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