Visual Studio - Javascript - 写入输出窗口

发布于 2025-01-03 10:12:04 字数 199 浏览 2 评论 0原文

我正在使用 VS2010 Express。我正在写一个javascript函数。

我想向输出文件夹写入一条消息,以便我可以查看程序期间访问的内容。

例如

function Myfunction() {
    console.write("point a has been reached");
};

I am using VS2010 Express. I am wrting a javascript function.

I want to write a message to the output folder so I can see what was accessed during the program.

eg

function Myfunction() {
    console.write("point a has been reached");
};

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

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

评论(1

远昼 2025-01-10 10:12:04

如果您正在调试网页,请将以下内容放入 HEAD 部分:

<meta http-equiv="X-UA-Compatible" content="IE=8"/>

然后:

Debug.writeln("hello");

将输出到立即窗口。如果您使用 Visual Studio 通过 cscript 调试 Windows 脚本 javascript,那么您应该能够使用 Debug.writeln,而无需任何其他代码。

If you are debugging a web page, put the following in the HEAD section:

<meta http-equiv="X-UA-Compatible" content="IE=8"/>

And then:

Debug.writeln("hello");

will output to the immediate window. If you are using Visual Studio to debug a windows scripting javascript via cscript, then you should be able to use Debug.writeln without any additional code.

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