Home > Software design >  Find the execution flow when an API is called from postman
Find the execution flow when an API is called from postman

Time:08-19

Is it possible to call an api such as "localhost/calculate" using PostMan and find out which classes or methods are called in order?

It would be like (GetCalculateResult(), Calculate.cs) -> (MathLogic(), Math.cs) and etc?

I want to know the way so it will be easier when I'm trying to understand how others codes work.

Thank you in advance!

CodePudding user response:

Yes you can do that using the call stack functionality in visual studio and WinDbg

Visual Studio:

By using the Call Stack window, you can view the function or procedure calls that are currently on the stack. The Call Stack window shows the order in which methods and functions are getting called. The call stack is a good way to examine and understand the execution flow of an app.

Implementation:

To view the call stack:

Start the debugger and stop at a breakpoint.

enter image description here

You can get more details here in the offical document

WinDbg:

Another tool you can use to check your application call stack strace mecanism using WinDbg tool

You could have a look at more details here in the offical document

Note:

For WinDbg tool you might need to get familiar with the tool functionality first. It used to use details investigation purpose.

  • Related