gin
gin copied to clipboard
No error log display when use gin with dlv for remote debug
Description
I use gin in my docker container.
I start my gin server use this: (In fact, it works, i can remote debug use VSCode)
dlv --listen=:2345 --headless=true --log --api-version=2 --continue --accept-multiclient debug .;
But, the issue is, when error happen, i could not see the error log come from gin, e.g.
like this:
panic: read app/views/users: is a directory
goroutine 1 [running]:
html/template.Must(...)
/usr/local/go/src/html/template/template.go:374
github.com/gin-gonic/gin.(*Engine).LoadHTMLGlob(0xc0001ce1a0, {0xbf0811, 0xb})
/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:225 +0x2e6
admin/config/routes.Config()
/app/config/routes/routes.go:22 +0x92
main.main()
/app/main.go:9 +0x19
exit status 2
Expectations
dlv can show gin log.
Environment
- go version: go version go1.18.2 linux/amd64
- gin version (or commit ref): 1.7.7
- operating system: alpine use with docker-compose
Thank you.
There is another LSP connection issue which should be relative this topic too.
https://github.com/emacs-lsp/dap-mode/issues/630