+7
Planned - Long term

Save variables to file

Omer Raviv 9 years ago updated by Omer Raviv (CTO) 6 years ago 3
Suggested as a comment on comment on this stackoverflow page

It would be nice if we'll allow the user to save variables to a file, in a human-readable-format (XML/JSON/etc), and also allow the user to load variables from the file, so he can compare to a previously saved variable even after Visual Studio is closed.


It was also requested that we have an option to save only the starred values, and not everything.
Some users would also like to be able to export to Excel directly from BugAid.
+1 Would make a good feature
+1 For this feature!  I don't even care so much about the output type.  XML, JSON, etc... I'm currently using the following method that takes an object and serializes it into XML:

public static void WriteObjectToXml(T objectToSerialise)
{
StringWriter Output = new StringWriter(new StringBuilder());
XmlSerializer xs = new XmlSerializer(objectToSerialise.GetType()); xs.Serialize(Output, objectToSerialise);
  using (TextWriter writer = File.CreateText("Output.xml"))
  {
    writer.WriteLine(Output); writer.WriteLine(writer.NewLine);
   }
}

To Call:

WriteObjectToXml(SomeObject);

Edit - The formatting of the code above doesn't look good in this post...