如何使用文本可视化工具?

发布于 2024-11-14 16:17:44 字数 473 浏览 2 评论 0原文

我发现这个链接介绍了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技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

南笙 2024-11-21 16:17:44

可视化工具是 Visual Studio 调试器的一项功能,即它们是运行时功能。

设置断点,运行程序并将鼠标悬停在变量名称上:

Screenshot

 
在设计时,Visual Studio 仅显示变量的类型:

Screenshot

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

浮光之海 2024-11-21 16:17:44

将一些 XML 内容放入字符串中,然后重试。

Put some XML content inside your string and try again.

定格我的天空 2024-11-21 16:17:44

你在什么时候设置断点?如果您位于第一行(字符串 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文