Golang debug not working

I followed a guide and created an app using a template. When I deploy it to AWS, it works.

When I try to run debug. It runs and listens to request. But it returns 500 internal server error.

Can you help me ?