Fog Creek Software
Discussion Board

Function Dependancy Walker

I'm looking for a tool that will allow me to walk function dependancies. The app I'm dealing with at the moment makes spaghetti code look brilliant.

I would like to see a list/tree etc of the functions, select one, and see every other function that calls it.

I might be overlooking the forest for the trees here, but if anyone's got any ideas, they're much appreciated.

Geoff Bennett
Tuesday, July 8, 2003

The latest beta version of Eclipse ( ) (3.0 beta) has a view with a tree of method calls. Currently, this is only for Java code.

Laurent Peters
Tuesday, July 8, 2003

McCabe will do it very well for a huge cost.
Nothing else comes to mind at the moment.

Simon Lucy
Tuesday, July 8, 2003

A few good utilities got mentioned here:

I'm not sure if they're what you need, but there's some discussion of dependancy walkers - both that go through running .exe's and will "open" an exe.
Tuesday, July 8, 2003

VC 6 will do this if you build Browse Information. In the ClassView, right-click a function and choose 'Called By...' To go the other way, select 'Calls'. I'm not yet fully familiar with versions after 6, so I'm not sure how you access this feature in VS.NET.

This only covers static analysis: if it's called through a function pointer, the call doesn't show up.

Mike Dimmick
Tuesday, July 8, 2003


Which language are you using?

For VB6 try MZTools.

Ged Byrne
Tuesday, July 8, 2003

I have heard of people very happy with this product: Source Insight

Tuesday, July 8, 2003

Sorry, I should've mentioned the language (I was rushing to meet a train... home<g>).


I want to look at refactoring parts of this tragedy, and finding out what calls what is the best place for me to start right now. It's not DLL dependancies, but within VB.

There are dozens of modules, all ridiculously huge, with no cohesive thread tying the methods together.

There will be six functions called different things that take the same parameters in different orders and do exactly the same process, and there'll be one function that takes a whack of different parameters, and depending on one (usually called ilTypeOfAction or something similar) do five or six completely different things.

M-Z tools looks absolutely awesome and bang on. I think I've heard of it before now that I'm poking around the site.

Thanks for the tips everyone.

Geoff Bennett
Tuesday, July 8, 2003

MZ looks cool, although I don't see anything about DEPENDENCY checking.

Does it do that?  If so, how do I access that?

(Perhaps it MIGHT be in the XML documentation it generates?)

Tuesday, July 8, 2003

Try the Aivosto web site here:

I use their Project Analyzer and Visustin products to do just what you are doing. Had a hairy VB6 app that does Estimated Time to Completion and Forecasting done by a total amateur. Had to refactor a lot of code for it to actually work.

The Project Analyzer demo lets you process a max of 10 files.

Tuesday, July 8, 2003


There is a 'Procedure Callers' button that lists all of the calls to the current procedures.

You can also achieve a lot with the Search function, which places all of the results into a tree.

Not exactly a Dependency checker, but very effective once you have the hang of it. 

Ged Byrne
Tuesday, July 8, 2003

MZ-Tools is awesome.

You Shift-F2 into the function you want to enquire about, then from the context menu click "Procedure Callers". It scans the project and spits back each function that refer to it and shows you the actual line of code where the function is called.

Geoff Bennett
Tuesday, July 8, 2003

>>For VB6 try MZTools.

Gee, I do a ton of work in VBA, and that is way cool!

While in a routine, I whack the "procedure callers button”

You get a nice list of ALL code that *CALLS* the current procedure . That means anywhere in your application all routines that reference the current sub/function are shown. (and you can use that list to “jump” to those routines)

What a nice tool...and it is free.

I sure all you VB folks know what while in code you can place your cursor on any produce call, or any function call and whack shift-f2. You instantly jump to the that procedure. You can continue this process of jumping / navigating through your code. And , after drilling down through the code, you can un-cork backwards, if you hit ctrl-shift-f2. I used that feature for years, and really do like it.

This drill down approach also works in the VBA environment (word, excel, ms-access).

However, the addition of the MZTools also gives the list of routines (and forms!) that references the current sub/function you are in (and as mentoend, you can use that list as jump point also).

Very nice little utility..and it is free. With both of the above methods, you can really zoom around in code.

Thanks for a cool tips guys....

Albert D. Kallal
Edmonton, Alberta Canada

Albert D. Kallal
Wednesday, July 9, 2003

I second Aivosto.

I have tried the eval version with good results (too cheap to spend a few bucks to get the full version).

It will give you a much bigger picture of your project.

will look for all kinds of known bad programming practices,
unused procs / variables,
give preformance suggestions,
give you a complete function call diagram, etc.

Wednesday, July 9, 2003

*  Recent Topics

*  Fog Creek Home