codegangsta / gin

Live reload utility for Go web servers
MIT License
4.23k stars 317 forks source link

No error log when use gin with dlv for remote debug. #175

Closed zw963 closed 2 years ago

zw963 commented 2 years ago

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/gin@v1.7.7/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

Which would show when docker-compse up if run directly use go run . instead.

Any Idea? Thank you.

zw963 commented 2 years ago

Sorry, make issue wrong place.