Visual Studio Debugging - Breakpoints are ignored by editor

Folks,
I am seeking help with my visual studio code environment. I implement golang tests using the package ““testing””. I was always able to step through my code using the breakpoints I defined in the test. I recently upgraded my golang version go version go1.17.1 darwin/amd64. I have confirmed that my goroot/gopath and goobin values are correct. I can build all my code but I am unable to test and have the debugger stop at the breakpoint.

I have followed all the steps to create a launch configuration specific to my golang project Debugging Go with VS Code - LogRocket Blog

When debugging the code will not break/stop at the breakpoint. I am noting the following error in the “Debug Console”
Warning: working directory ignored with dap; launch requests must specify full program path

I would appreciate any help/direction with resolving this.

Have you tried upgrading your Go tools?

1 Like

Here is my launch.json, works correctly, do you have similar paths ?
Sometimes I have to uninstal go plugin and install it again, it helps with weird problems.

    "configurations": [
        {
            "name": "Launch",
            "type": "go",
            "request": "launch",
            "mode": "auto",
            "program": "${workspaceFolder}/${workspaceFolderBasename}.go",
            "env": {},
            "args": [
                "-c",
            ],
        },
1 Like

THANK YOU Tom/Sean for responding. I ended up having to manually install the delve library to solve the problem. I am now able to debug.
Appreciate the support.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.