Search Results

Search found 6 results on 1 pages for 'debuggervisualizer'.

Page 1/1 | 1 

  • Debugger Visualizer, ElementHost, and Edit and Continue problems

    - by Frank Fella
    I recently wrote a custom Debugger Visualizer for Visual Studio 2008 for one of the custom types in my application. The UI for the visualizer is written in WPF and is hosted in an element host and shown using the IDialogVisualizerService windowService object. Everything works great, and my visualizer loads and shows the relevant information, but if try to "edit and continue" in my application after loading the visualizer, Visual Studio crashes with no useful error message. In trying to debug this I removed almost all of my code from the solution to the point where I was only serializing a string with the ObjectSource and displaying just an empty element host and I still get the crash on edit and continue. If I remove the element host and show a WinForms control or form there is no crash. Here is the Visualizer code: using System; using System.Drawing; using System.IO; using System.Runtime.Serialization.Formatters.Binary; using System.Windows.Forms; using System.Windows.Forms.Integration; using Microsoft.VisualStudio.DebuggerVisualizers; using ObjectVisualizerShared; using ObjectVisualizerUI; namespace ObjectVisualizer { public class Visualizer : DialogDebuggerVisualizer { protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider) { try { Stream stream = objectProvider.GetData(); if (stream.Length > 0) { BinaryFormatter formatter = new BinaryFormatter(); VisualizerNode node = (VisualizerNode)formatter.Deserialize(stream); if (node != null) { VisualizerWindow window = new VisualizerWindow(node); ElementHost host = new ElementHost(); host.Child = window; host.Dock = DockStyle.Fill; host.Size = new Size(800, 600); windowService.ShowDialog(host); } } } catch (Exception ex) { MessageBox.Show(string.Format("Error!\n{0}", ex), "Object Visualizer"); } } } } Any ideas?

    Read the article

  • "Replay" the steps needed to recreate an error

    - by David
    I am going to create a typical business application that will be used by a few hundred consultants. Normally, the consultants would be presented with an error message with a standard text. As the application will be a complicated one with lots of changes being made to it constantly I would like the following: When an error message is presented, the user has the option to "send" the error message to the developers. The developers should be able to open the incoming file in i.e. Eclipse and debug the steps of the last 10 minutes of work step by step (one line at a time if they want to). Everything should be transparent, meaning that they for example should be able to see the return values of calls to the database. Are there any solutions that offer such functionality today, my preferred language is Python or also Java. I know that there will be a huge performance hit because of such functionality, but that is acceptable as this kind of software is not performance sensitive. It would be VERY nice if the database also had a cronology so that one could query the database for values that existed at the exact time that a specific line of code was run in the application, leading up to the bug.

    Read the article

  • Is there an easy way to make `boost::ptr_vector` more debugger friendly in Visual Studio?

    - by Billy ONeal
    I'm considering using boost::ptr_container as a result of the responses from this question. My biggest problem with the library is that I cannot view the contents of the collection in the debugger, because the MSVC debugger doesn't recognize it, and therefore I cannot see the contents of the containers. (All the data gets stored as void * internally) I've heard MSVC has a feature called "debugger visualizers" which would allow the user to make the debugger smarter about these kinds of things, but I've never written anything like this, and I'm not hugely firmiliar with such things. For example, compare the behavior of boost::shared_ptr with MSVC's own std::tr1::shared_ptr. In the debugger (i.e. in the Watch window), the boost version shows up as a big mess of internal variables used for implementing the shared pointer, but the MSVC version shows up as a plain pointer to the object (and the shared_ptr's innards are hidden). How can I get started either using or implementing such a thing?

    Read the article

  • How do I use my own debugger visualiser to edit variables runtime?

    - by C Sharper
    I'm writing my own debugger visualiser. All works great to show up to visualiser with the data. Now I add the code for more clearness: public class MyVisualiserObjectSource : VisualizerObjectSource { public override void GetData(object target, Stream outgoingData) { string data= target as string; var writer = new StreamWriter(outgoingData); writer.Write(data); writer.Flush(); } } public class MyVirtualizer : DialogDebuggerVisualizer { protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider) { var streamReader = new StreamReader(objectProvider.GetData()); string data = streamReader.ReadToEnd(); using (var form = new MyVirtualizerForm(data)) { windowService.ShowDialog(form); } } } The string here is passed to the visualizer and show my own form. It works. But now I want to pass back the modified data from the form to the variable. How do I do that? Edit: I found out that I need to override the TransferData method in VisualizerObjectSource. But in the MSDN is no detail information about how I implement this correctly. Can someone help me please?

    Read the article

1