What is the best way to follow the software flow?

Asked

Viewed 128 times

4

I have a big project, how do I follow the flow (step by step)?

I have several classes and have no idea which methods are called, which classes are etc. I put a breakpoint in a point that I know goes through there, in debug mode but then it passes the point and continues the flow normally.

  • What language and Debugger are using?

  • @Bigown Intellij and Java

  • 2

    Take a look and tell us if it can help you: https://www.jetbrains.com/idea/help/debugging.html

  • What is the goal? Would it be to understand how the system works (like reverse engineering)? I ask this because the answer from the colleague who suggested to Junity makes sense if your need is, for example, to find out where there is a problem (something closer to debugging that you cite yourself, but that doesn’t explain exactly why it doesn’t serve).

  • 3

    Assuming I’m right in inferring that you want to understand how the system is structured, maybe it’s easier for you to use some modeling tool that is able to import certain diagrams from code, like the class diagram, and then study the structure of the system in terms of components and classes. Without wanting to do (and already doing) advertising a paid tool, the only one I remember that does very well this is the Enterprise Architect.

  • The code works perfectly and I’m only going to refactor, the problem is that the system is huge and is difficult to understand. I will try to transform the class diagram, more readable

  • A solution instead of paid tools: https://www.jetbrains.com/idea/features/uml_class_diagram.html

Show 2 more comments

1 answer

2

You can use the framework Junit. Which aims to facilitate the creation of code for test automation with presentation of results. With it, it can be checked if each method of a class works in the expected way, showing possible errors or failures can be used both for the execution of test batteries and for extension.

  • 2

    I don’t need tests, I want to follow the program flow at runtime: Be able to return the next and previous line of code, like debug mode

  • In this case, you can look at the manual of the IDE itself, as suggested above.

  • Well, it has nothing to do with the question.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.