leoluz / nvim-dap-go

An extension for nvim-dap providing configurations for launching go debugger (delve) and debugging individual tests
MIT License
432 stars 73 forks source link

Help needed to debug go gin project #71

Open h-tiwari-dev opened 4 months ago

h-tiwari-dev commented 4 months ago

Hi, I need you help to add a configuration to run gin project. I want to run "$ go run ." Is there anyway to run custom commands(like the config we can create in launch.json in vscode).

Sorry for the noob question, I'm new to neovim and any help is really appreciated.

Catalyn45 commented 4 months ago

Doesn't the debug package configuration work for you? I believe what it does is run go build . then starting the resulting executable, basically what go run . does under the hood.

leoluz commented 3 months ago

@h-tiwari-dev go run isn't a good way to debug Go code and it doesn't publish the necessary symbols. Prefer using go build whenever possible.