Topic:   How to Dump Object for Debugging Purposes in C# ?
Aug 11, 2021 05:59 4 Replies 65 Views FRAUSKY

How to Dump Object for Debugging Purposes in C# ?

Prev Next
Topic Replies (4)
  1. 1
    idnkx user

    KRISHNA SWAROOP

    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
    http://codingsonata.com/how-to-dump-object-for-debugging-purposes-in-csharp/?fbclid=IwAR1UJjT6dRo45vmButSWxaCwoeC1AKByBOQfSaKagqldPfN5Sich-_ERWf4

    1
    idnkx user

    SAI

    @Krishna Swaroop What is the benefits over “add to watch “ method. We can see all the values of object properties there too..

    1
    idnkx user

    FRAUSKY

    '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.

    1
    idnkx user

    SAI

    @Frausky Thank you for bringing and sharing with us about this debugging purposes.

Leave a Reply
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.


Let`s Connect