Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access "autos" in process (at runtime)

Is it somehow possible to access the debuggers "autos" from code/in-process? E.g. to create a dump of all members/variables and their respective values from the current scope?

autos

like image 298
artganify Avatar asked Mar 24 '26 03:03

artganify


1 Answers

You can get some information shown there, but not all.

You can get the current classes' properties and fields using reflection. Simply use GetProperties for example. You have to make that call from the method you are executing though, no way to get to know which instance is in the call stack now.

You can't get the parameters and variable values from the current method call.

like image 143
Patrick Hofman Avatar answered Mar 25 '26 18:03

Patrick Hofman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!