Run delve in headless mode, logging rpc calls to the delve.out
file
= ./go/bin/dlv core adjust_server core.250387 --headless --listen 178.162.216.107:40233 --api-version=2 --log --log-output rpc 2> delve.out
Get list of running goroutines:
= dlv connect 178.162.216.107:40233
goroutines
....
Grab raw JSON from delve's debug logging
= tail +12 delve.out | awk '{print $4}' | tail -c +24 | sed 's/\\\"/"/g' > adjust_server-delve.json
Get interesting fields
= jq -r '.Goroutines[] | .startLoc.file,.startLoc.line,.startLoc.function.name' adjust_server-delve.json | sed 'N;N;s/\n/:/g'