Step 1: Select "advanced"-"security"-"Enable integrated Windows Authentication" in Internet Settings of IE (this step is very important !!!)
Step 2: also remove the "Disable script debugging" check in "Internet Settings"
Step 3: Start in debug mode Program
Step 4: Select "debut" -- "Windows" -- "script Explorer" in the vs2005 menu"
Step 5: double-click the page to debug in the script Explorer window
Step 6: Set the breakpoint at the location where the script is required to start debugging in this document
Step 7: run the program on your own, and the rest is the debugging program,
Note: If the problem persists, a cookie named "aspclientdebug" may be missing. How to set this cookie:
1. The creation includes the following: Code HTML text file:
<HTML>
<Head>
<Script language = "JavaScript">
Function set ()
{
VaR expdate = new date ();
Expdate. setmonth (expdate. getmonth () + 6 );
Alert ("setting cookie \" "+form1.txt name. Value +" \ "to \" "+form1.txt value. Value + "\"");
Setcookie(form1.txt name. Value, form1.txtvalue. Value, expdate );
}
Function get ()
{
Alert ("getting cookie \" "+form1.txt name. Value + "\"");
VaR c = getcookie(form1.txt name. value );
Alert ("Cookie =" + C );
Form1.txtvalue. value = C;
}
Function getcookie (scookiename)
{
VaR sname = scookiename + "=", ichst, ichend;
VaR scookie = Document. Cookie;
If (scookie. Length & (-1! = (Ichst = scookie. indexof (sname ))))
{
If (-1 = (ichend = scookie. indexof (";", ichst + sname. Length )))
Ichend = scookie. length;
Return Unescape (scookie. substring (ichst + sname. length, ichend ));
}
Return NULL;
}
Function setcookie (sname, vvalue)
{
VaR argv = setcookie. Arguments, argc = setcookie. Arguments. length;
VaR sexpdate = (argc> 2 )? "; Expires =" + argv [2]. togmtstring ():"";
VaR Spath = (argc> 3 )? "; Path =" + argv [3]: "";
VaR sdomain = (argc> 4 )? "; Domain =" + argv [4]: "";
VaR sSecure = (argc> 5) & argv [5]? "; Secure ":"";
Document. Cookie = sname + "=" + escape (vvalue, 0) + sexpdate + Spath + sdomain + sSecure + ";";
}
Function deletecookie (sname)
{
Document. Cookie = sname + "=" + getcookie (sname) + "; expires =" + (new date (). togmtstring () + ";";
}
</SCRIPT>
</Head>
<Body>
<Form name = form1>
Cookie name: <input type = "text" name = "txtname" value = "aspclientdebug"> <p>
Cookie value: <input type = "text" name = "txtvalue" value = "doesn' t matter"> <p>
<Input type = "button" value = "set cookie" onclick = "set ()">
<Input type = "button" value = "get cookie" onclick = "Get ()">
</Form>
</Body>
</Html>
2. Save the file as cookie.html.
3. copy the file
C: \ inetput \ wwwroot
4. in Internet Explorer's address box, type:
Http: // localhost/cookie.html
5. In the http: // localhost/cookie.html window, click "set cookie.