I'm using VS 2010 and am working with a lot of streams in C# in my current project. I've written some stream dump utilities for writing out certain types of streams for debugging purposes, but I seem to keep stumbling across times when I am debugging and need to look into the stream I am debugging over, but I didn't put my dump calls in there. It seems like I should be able to dump the stream somehow just using VS or maybe tell it to call one of my dump methods on a stream in the debugger. Is there a wy to do this?
The streams I am working with have some text describing a blob of data and then the bytes of the blob, so looking at the description is useful. My dump methods typically just dump that information out and then skip the blobs.
The Streams Debugger provides the following abilities to observe and change the data as it flows in the application: Setting breakpoints to suspend thread execution when a tuple arrives at a port. Updating tuple values before your application continues execution of a stopped breakpoint.
Press F5 and start debugging the solution B instance of Visual Studio. Then press F5 and start debugging the solution A instance of Visual Studio. Now both the instances of Visual Studio will be in debug mode.
The Visual Studio debugger can help you navigate through code to inspect the state of an app and show its execution flow, which is also known as code stepping. You can use keyboard shortcuts, debug commands, breakpoints, and other features to quickly get to the code you want to examine.
Type this into the Immediate Window:
System.Diagnostics.Debug.WriteLine((new System.IO.StreamReader(stream)).ReadToEnd());
Maybe you could write a Visualizer? MSDN explains how here: http://msdn.microsoft.com/en-us/library/e2zc529c.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With