Plugin Debugging on MacOS (Apple Silicon)

Hi,

as it took me a longer while to get it running, I wrote an article about it: Grafana Plugin Debugging on Apple Silicon. I hope it helps others, thus I hope it’s okay to post here.

Long story short: compile Grafana yourself, because there is no DARWIN ARM64 package available (as of now).

Happy to receive comments of how to fix where I failed :wink:

Hey,

Thanks for sharing. Regarding there’s no DARWIN ARM64 package, if you use brew to install it should work, see Install Grafana on macOS | Grafana documentation and grafana — Homebrew Formulae. Otherwise Docker is a popular choice as well. Maybe we make a Darwin ARM64 binary available in the future.

the make build:debug (which is automatically invoked by the debugger target) is only creating a debug build for the current platform. My Mac’s current platform is ARM64, not AMD64!

Seems like you’ve found a bug so I created a new issue Darwin ARM64 not built for build:debug mage target · Issue #798 · grafana/grafana-plugin-sdk-go · GitHub. If you’re up for it we would be happy to receive/review a pull request to resolve this. If not, please let us know and we try to plan for resolving it.

Hi @mefraimsson, thanks for looking at this and your reply!

Indeed, just installing it from homebrew also gives an ARM64 Grafana. If I had just known before (and homebrew also spits out the path with all parameters, if one doesn’t want to run it as a service).

So I will add that to the blog post - and also look at the issue.