[Urgent Help] How to debug backend server codes directly

Hi, grafana is very powerful and useful! We’re customizing dashboard these days, but find that it’s hard to debug backend server codes, because of following scenes:

  1. Develop with command:make run:
    Grafana would watch codes and build a ‘grafana-server.exe’ to execute server. If codes modified(for example, add a log for debugging), grafana will rebuild a ‘gafana-server.exe’ to execute server, but the time takes about 30 seconds, which are too long(on windows, computer’s hardware performance is also high enough)

  2. Develop with command go run pkg/cmd/grafana-server/main.go directly:
    With no luck, errors threw.

But if there’s a way to run server codes directly(without generating a grafana-server.exe), we’re able to debug server codes even using breakpoints like this:

Can you provide a guide about how to debugg backend server codes directly? Or can you tell us how your team debug the server codes?

Grafana version: 7.4.0-pre

Thank you!

Grafana team helps on github: https://github.com/grafana/grafana/issues/29459