q0987
q0987

Reputation: 35992

How to use the text visualizer?

I have found this link that introduces the usage of Text Visualizer.

http://saraford.net/2008/09/23/did-you-know-how-to-use-the-text-visualizer-319/

Also, I have used the following code snippet in order to trigger the text visualizer in VS2010 SP1.

string str = "Hello World";
Console.WriteLine(str);

When I hover the mouse on top of str, I only see "(local variable) string str" without seeing the exptected "Text Visualizer/XML Visualizer/HTML Visualizer". Do I miss something here?

Upvotes: 0

Views: 4285

Answers (3)

dtb
dtb

Reputation: 217361

Visualisers are a feature of the Visual Studio Debugger, i.e. they're a runtime feature.

Set a breakpoint, run your program and hover the mouse over the variable name:

Screenshot

 
At design-time, Visual Studio shows only the type of the variable:

Screenshot

Upvotes: 6

brien
brien

Reputation: 4440

At what point are you setting the breakpoint? If you're on the first line (string str=) then there isn't a value for str yet.

Set the breakpoint on the second line, then mouse over str.

Upvotes: 0

Erick Petrucelli
Erick Petrucelli

Reputation: 14912

Put some XML content inside your string and try again.

Upvotes: 0

Related Questions