Skip to content
| Marketplace
Sign in
Visual Studio>Tools>Object Exporter

Object Exporter

Omar Elabd

|
51,788 installs
| (65) | Free
Object Exporter creates serializations of in memory objects from your various debugging windows. Currently supported output formats are: CSharp Object Initialization Code, JSON and XML.

*Note: I had to reupload this package due to issues with the gallery causing an error page anytime anyone viewed the extension page or tried to update the package. If you have a previous version of Objection Exporter (prior to 1.2.4) please uninstall it and install this extension as to receive any future updates.

Source Code | Report Bug | Request Feature | Release Notes

 

Object Exporter lets you export out an object while debugging in Visual Studio, the object can be serialized in either C#, JSON or XML.

 

In Action


Use Cases

  1. Persisting an object state for debugging comparisons.

  2. Searching for information within objects.

  3. Generating C# object initialization code for unit testing.

Output

The currently supported output formats are: C# Object Initialization Code, JSON and XML.

Instructions

Object Exporter is accessed through the tools menu and is only visible when you are debugging.

Select from tool menu

Once the menu option is selected a dialog is shown with settings for the Object Export.

Object exporter has two modes for selecting objects to export, one is by selecting from a checklist which is populated with your locals.

Select locals

The other mode is by writing a custom expression as you would in the watch window.

Custom Expression

Once an object is written or selected, object exporter will attempt to calculate it's depth in the background. This depth will give you an indication of what cutoff would need to be specified to export the entire object. Note some objects may contain circular references.

Select Locals with calculated depth

Once your objects and settings are selected, you may export them in your desired format. A dialog will be displayed with the generated ouput for each of your objects.

C#:

Generated C#

JSON:

Generated JSON

XML:

Generated XML

Settings

Object exporter settings is access through Tools -> Options -> Object Exporter

Settings

Powered By

Object Exporter is powered by RayGun.

Raygun


  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft