I
I
Ilyas Gaisin2019-02-24 05:38:05
go
Ilyas Gaisin, 2019-02-24 05:38:05

Visual Studio Code not working Golang debugging (WSL Ubuntu)?

Hello, I have a problem with the Golang debugger in Visual Studio Code.
Set up environment variable:

export GOPATH=$HOME/go
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin

Installed dlv and 10 more tools offered by Visual Studio Code.
I registered the launch.json configuration:
"configurations": [
        {
            "name": "Launch",
            "type": "go",
            "request": "launch",
            "mode": "debug",
            "program": "${workspaceRoot}",
            "port": 2345,
            "host": "127.0.0.1",
            "env": {},
            "args": []
        }
    ]

I set a breakpoint, start the debugger, it starts, writes to the Debug Console:
API server listening at: 127.0.0.1:2345
and that's it! Nothing else happens.
Thank you in advance!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question