Live data from Hacker News

Cscope: A developer's tool for browsing source code

cscope.sourceforge.net

31–37 of 37 posts

Re: Cscope: A developer's tool for browsing source code

#32
post #21

More direct link: https://sourceforge.net/projects/cscope/files/ I set the forward proxy automatically rewrite http://subdomain.sourceforge.net links into the above https:// format.

Hehe, I usually do the opposite, as the SourceForge project page usually contains very little information about the project in general and is usually harder to navigate than the home page.

I find all the information, if there is any, is inside the tarball. I use a text-only browser. Even with text-only, the Sourceforge pages are always a mess of cruft to wade through. I would not even attempt to use Surceforge with a popular browser.

Re: Cscope: A developer's tool for browsing source code

#33

A great tool for understanding source code is Source Trail. Supports parsing of C/C++, Python and Java currently. I love tools that help understand a large code base.

I take it you've used Source Trail? Are there any operations you particularly like using it for? Are there any you wish it could do, but it wasn't able to? I built https://twitter.com/PredragGruevski/status/13447256045208780... just for fun as an exploration of this space, and I'm wondering where the limits are :)

I have used it to graph large python projects and c++ projects. It is great for visualizing the classes and relationship of classes and functions along with references to all the program elements.

The hardest part for me has been setting up the list of files and folders to scan for the project and trying to eliminate errors. Fortunately you still get useful data depending on the errors.

Re: Cscope: A developer's tool for browsing source code

#34
post #27
post #18

Amazing that the last update was apparently 8 years ago. My workflow works better w ctags, but when ctags lack, cscope can usually fill the gap.

The changelog on that page is inaccurate, the last release was in 2018 ( https://sourceforge.net/projects/cscope/files/cscope/v15.9/ )

Cool - I posted a patch to pkgsrc so NetBSD, minix, illumos, etc can enjoy that “new” hotness.

Re: Cscope: A developer's tool for browsing source code

#35
post #22

Earlier quoted context omitted.

What has it got that makes it better than clang-complete/you complete me? I switched a few years ago, maybe i wasn't using all of cscope's strengths?

They are two different things; cscope is a source code browser while YouCompleteMe is for source code completion . The cscope features are listed on its home page. The reason i like it is because it is implemented in the classic "Unix Tools" manner i.e. small, fast, self-contained, good feature set and easily integrated with many editors. Now of course you have lots more tools with similar functionalities but i find…

>They are two different things; cscope is a source code browser while YouCompleteMe is for source code completion

Not in my experience. YCM does browsing in Vim better than cscope's the way i used both. It was an easy switch to make and not look back for me. YCM features seemed to me like a superset of cscope Vim integration. Maybe i was missing something? Jumping to and back to function callers, definitions, variables etc. Clang just seemed to work better. Possibly because it understands C parsing which cscope kinda does some heuristics and hopes for the best? Dunno.

But yeah because it parses properly you get tab completion that works too. That isn't a negative for mine. Don't have to use it, super convenient and fast sometimes when you do.

I run Vim in a terminal. Works most places with my vimrc etc that i would edit source code. Includes a mips router, arm phone etc.

I used cscope for years. Before that ctags. I consider them obsolete for my uses, but i may have been missing something. Still don't know what.

Re: Cscope: A developer's tool for browsing source code

#36
post #35

Earlier quoted context omitted.

They are two different things; cscope is a source code browser while YouCompleteMe is for source code completion . The cscope features are listed on its home page. The reason i like it is because it is implemented in the classic "Unix Tools" manner i.e. small, fast, self-contained, good feature set and easily integrated with many editors. Now of course you have lots more tools with similar functionalities but i find…

>They are two different things; cscope is a source code browser while YouCompleteMe is for source code completion Not in my experience. YCM does browsing in Vim better than cscope's the way i used both. It was an easy switch to make and not look back for me. YCM features seemed to me like a superset of cscope Vim integration. Maybe i was missing something? Jumping to and back to function callers, definitions, variabl…

I don't think you are "missing" anything. It is just a way of working with minimal overhead/setup and yet full-featured tools.

For example, for my work environment i have standardized on GNU Screen + dvtm + vim (few plugins) + cscope + ctags; thats it. Depending upon available hardware and need, i may add more tools but the above is what i try to carry everywhere.

Re: Cscope: A developer's tool for browsing source code

#37

You also had Kscope which was a KDE frontend for cscope. Currently an unmaintained project. https://sourceforge.net/projects/kscope/

Depends on how you define maintenance. See http://trinitydesktop.org/applications.php under Software Development.
Post reply on HN