In this very simple ASP.NET application, Visual Web Developer 2008 Express CAN debug the Javascript 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."
What do I have to do to my Visual Studio 2005 so that it debugs Javascript 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.");
}