3

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

artganify
  • 683
  • 1
  • 8
  • 23

1 Answers1

1

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.

Community
  • 1
  • 1
Patrick Hofman
  • 153,850
  • 22
  • 249
  • 325