clr - Is it possible to get parameters' values for each frame in call stack in .NET -


I'm talking about managed .NET code. If we run any program and VS If you attach, we can see the values ​​of the parameters of each method in the call stack. I want to create a logging solution that will log the values ​​of all the parameters for each method in the call stack. Actually I need this information, if there is an exception.

I know that this profile is possible with the API but I wonder if it is possible only with managed code?

UPDATE: OK, maybe it is impossible with net.NET, then there may be some kind of unmanaged code ... the issue is that it is from within the application itself. In the case of an exception, an application can call some libraries (can be unmanaged) which gives information about the values ​​of the methods in the call stack. Just thought ...

parameter values ​​are not stored in stackfire example In fact, they are all Records are not logged / logged, as long as you do not choose to explicitly do this.

A simple way of logging theses values ​​is to use AOP; it will definitely mean a cost, but with the logging structure and the correct log level, this can be an option for you to have your base code Only some types of methods / methods can be selected in, where there is a greater chance of throwing exceptions. I would probably like Postsharp to use log calls for its steady knitting capabilities.

However, this is not an ideal solution, but I am afraid that if you are stuck, then you will not have many options. In the managed world,


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -