如何使用文本可视化工具?
我发现这个链接介绍了Text Visualizer的用法。
http:// saraford.net/2008/09/23/did-you-know-how-to-use-the-text-visualizer-319/
另外,我使用了以下代码片段来触发文本VS2010 SP1 中的可视化工具。
string str = "Hello World";
Console.WriteLine(str);
当我将鼠标悬停在 str 之上时,我只看到“(局部变量)字符串 str”,而没有看到预期的“Text Visualizer/XML Visualizer/HTML 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
可视化工具是 Visual Studio 调试器的一项功能,即它们是运行时功能。
设置断点,运行程序并将鼠标悬停在变量名称上:
在设计时,Visual Studio 仅显示变量的类型:
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:
At design-time, Visual Studio shows only the type of the variable:
将一些 XML 内容放入字符串中,然后重试。
Put some XML content inside your string and try again.
你在什么时候设置断点?如果您位于第一行(字符串 str=),那么 str 还没有值。
在第二行设置断点,然后将鼠标悬停在 str 上。
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.