[SOLVED] Software to read through source code hierarchies?
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi, I'm wondering what is the best way to sift through a source code hierarchy?
I have little programming experience at all, except for a little Pascal, TurboC and some scripting. I do know Vi basics and would be willing to expand my knowledge of that, but I don't know what my options are. I would like some software with the look of Midnight Commander that helps summarize and arrange the source-code on screen and that would allow me to follow definitions between source files. In my case it is for Debian GNU, but do not limit your reply based on the OS.
I am hoping for open source software, but feel free to mention commercial software as well for the sake of anyone else reading the thread. Any suggestions will be appreciated!
ctags should be mentioned here. It has no dedicated GUI or TUI, but some text editors support it, e.g. vim. Typical usage looks like (assuming Debian/vim/C):
Code:
$ sudo apt-get install exuberant-ctags
$ cd <source directory>
$ ctags-exuberant -R # this will create the `tags' file in current directory
$ vim -t main # jump to the file with main(){...};
Enter `:help tags' in vim to get documentation about keybindings etc. Here is a couple of shortcuts to get started:
Code:
CTRL-] Jump to the definition of the word under cursor.
CTRL-T Jump back.
You might want to look at doxygen too. It creates documentation from your source files. It can also creates dependency diagrams.
I thought I'd get back to you on Doxygen. I installed Doxygen on Debian Wheezy (A64), and I used it to take a look at the source code for Mplayer (a huge pile of 'Self Documenting' source code). After installation of Doxygen I found 'Doxywizard' in my menu. I put in the various file paths and added some checks to check boxes in the 'Expert' section, and Doxygen did an excellent job. There was an additional package (Graphviz) I had to "apt-get install" myself to enable Doxygen to automatically create graphs. Then it made graphs and even did them in .svg format. Additionally Doxygen can create tag files, and the developers are talking about adding what they call Autogen support. I'm very impressed with it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.