The perfect way? Both.
You mentioned goals: “debug” and “understand the flow of the application” - it is very difficult to debug before understanding the flow, but understanding can be an end in itself.
In the real world, when working with large distributed systems, it often cannot rely on debuggers, at least initially, not least because some problems appear only when the system is busy or after several hours of operation. Therefore, good debugging tracing and fine-grained control over this tracing in application code and infrastructure code are important.
However, if you have the ability to run a debugger that can be sufficiently lit.
First of all, I think you need:
). , .
). IDE, . . . , , , ? , ? ?
followng , , .