Search code examples
linuxstack-tracecurses

Need a tool for exploring stacktrace frames


I commonly wind up trouble-shooting web apps written in varied languages, located on heterogeneous servers that aren't mine. I'm often in the situation of having a stacktrace from a log file, and wanting to explore the code associated with it.

Despite the many varied forms, there's a pretty strong convention that each line of the stacktrace represents one call deeper or shallower in the calling stack, and each has something in it that looks like directory/path/file.ext:linenumber. The path might be absolute, but just as likely is relative to some base folder for the app.

I need a tool or a technique that doesn't require a lot of installation that will allow me to click back and forth between the code locations referred to in the stacktrace. Maybe it's just a way of munging things into a command line for less or vim or some such? Unfortunately while I can easily give a list of files on the command line, I don't know a way to specify a list of positions in those files.

Any suggestions?

Ideally this should involve installing as little as possible. Mostly I'm on Debian and Ubuntu servers, but sometimes Redhat or Centos.


Solution

  • That is basically the output format from grep -n, which some text-editors understand — and allow you to walk though the matches.