Register or Login to Your Account
How to Dump Object for Debugging Purposes in C# ?
Dumping object is a great way to visualize values and types while enabling you to easily debug and detect problems at runtime. This is particularly important whenever you don’t have access to specific debugging tools. This is basically a lengthy process to explain but i have seen some article regarding this, this could be useful to you just go through the link below
@Krishna Swaroop What is the benefits over “add to watch “ method. We can see all the values of object properties there too..
'add to watch' is a feature you can use to debug your app while you are 'in development mode', when your app is on production you need a way to 'debug' your application, you can achieve a similar behavior by dumping the objects (and whatever objects are nested in them) in log files to verify their values, this is largely helpful in detecting 'object reference not set to an instance of an object' or 'value cannot be null' exceptions your app might face at production time where the option of 'add to watch' doesn't exist.
@Frausky Thank you for bringing and sharing with us about this debugging purposes.