Plugins communicate with the main Mattermost Server by RPC. In order to debug them with Delve, a few steps are necessary.
ps aux | grep name.of.your.plugin. This will print a list of running processes that match that name, as such:
username 78836 0.0 0.1 4397696 12492 s006 S 7:07AM 0:00.03 plugins/name.of.your.plugin/server/dist/plugin-darwin-amd64.
pid, which is the second number after your username in the output above. Run
dlv attach pid, where
pidis that number. let the plugin continue executing soon after connecting; Otherwise, the server will detect it as stopped and attempt to restart it.