为什么Visual Studio 2005不调试我的JavaScript代码? [英] Why will Visual Studio 2005 not debug my JavaScript code?

查看:132
本文介绍了为什么Visual Studio 2005不调试我的JavaScript代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在这个非常简单的ASP.NET应用程序中, Visual Web Developer 2008 Express CAN调试 JavaScript代码很好,但完整版本的 Visual Studio 2005无法调试它即:当我点击main.js文件中的一行时,它给我一个红色圆圈,问题标记在其上,鼠标悬停显示:这个断点将不会达到,没有符号被加载为这个文件。

In this very simple ASP.NET application, Visual Web Developer 2008 Express CAN debug the JavaScript code fine, but the full version of Visual Studio 2005 CANNOT debug it, namely: when I click on a line in the main.js file it gives me a red circle with a question mark on it, the mouse hover revealing: "This break point will not be reached, no symbols were loaded for this document."

我要做什么我的Visual Studio 2005,以便它调试JavaScript代码像我的Visual Web Developer 2008? / strong>

What do I have to do to my Visual Studio 2005 so that it debugs JavaScript code like my Visual Web Developer 2008?

Default.aspx:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TestJavascriptDebugging2005._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
            <script type="text/javascript" src="javascript/main.js"></script>
    </head>
    <body>
        <form id="form1" runat="server">
            <div>
                <p>This is HTML and <script type="text/javascript">test()</script>.</p>
                <p><button onclick="doIt(this)">Test</button></p>
            </div>
        </form>
    </body>
</html>

javascript / main.js:

function test() {
    document.write("this is from javascript code2");
}

function doIt(element) {
    alert("This is the javascript function2.");
}


推荐答案

之后:

i。在IE中启用脚本调试。

i. Enable script debugging in IE.

ii。在脚本资源管理器中打开客户端脚本,您可以快速调试。

ii. Open the client side script in the script explorer, and there you are happy debugging.

有关如何完成此操作的详细信息,请通过以下链接拿起这个伎俩。

For details on how to accomplish this, please go through the following link from which I originally picked up this trick.


  1. 调试客户端 javascript

  2. Kb 从Microsoft解释相同。

  1. Debugging client javascript in VS2005.
  2. A Kb from Microsoft explaining the same.

这篇关于为什么Visual Studio 2005不调试我的JavaScript代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆