Is there a way to get a list of running goroutines along with stack trace information? I can't see anything in the docs, so I'm assuming no.
I'd like to see what's running so I can debug goroutines that may be leaking or just be running for longer that I believe they should be (even if they aren't leaked).
This also got me thinking thinking about some sort of runtime "plugin" system. Maybe as a core feature this ability to get at goroutines isn't a good idea, but if there were some way to poke inside the runtime with a C plugin, then the plugin could supply this functionality. Then you can load it to do your debugging, and remove it afterwards (probably not while the program is running....but maybe...).
I'm just thinking out loud. The main thing is getting that list of goroutines with stacks.
Thoughts?
--
Daniel Huckstep