1

I often have to analyze (semi)complex software systems to add a small feature or tweak something in the code. To better grasp the flow of the code, I like to have a temporary flowchart to show me the flow of (a part of the) code. For example:

-User clicks on button Start -Method "button_pressed_start" runs -Method "do something" runs -The calculatued value of "do something" was : 42 (sometimes I like additional info) -Method "show_result" runs

Using a stacktrace doesn't work because what I need is the CHANGES to the stacktrace, not the stacktrace itself. The way I do this is now by adding a sysout statement in every method in Eclipse, or a Debug.Writeline statement in Visual studio. Of course, this is cumbersome and it does not really show if method A invokes method B.

Are their any programs, tools or practices to accomplish this? My main IDE's are Eclipse and Visual Studio.

user1884155
  • 3,616
  • 4
  • 55
  • 108
  • You could use `AspectJ` for Eclipse - see http://stackoverflow.com/questions/8839077/how-to-use-aop-with-aspectj-for-logging – greg-449 Dec 19 '13 at 09:53

2 Answers2

0

For Eclipse there are a few plugins that I found for you to use:

Control Flow Graph Factory 4.3.1 and Sourcecode Visualizer 4.3.2 both look like good tools for analysing what is going on in your program. As for auto inserting a print statement, I'm afraid I don't know of any way to do that. Unless you feel like writing a regular expression and parsing your java files.

Rossiar
  • 2,416
  • 2
  • 23
  • 32
0

For .NET applications you can use the Runtime Flow tool to show all executed methods with parameters and return values.

Sergey Vlasov
  • 26,641
  • 3
  • 64
  • 66