How to debug server-side JScript code
-
Saturday, September 01, 2012 2:22 PM
I need to maintain a classic ASP project where requires debugging server-side JScript code. For example, consider an A.aspx file with the following code:
<% @Page Language="JScript" aspcompat="true" %> <% var a = 1; var b = a + a; ...// Other statements here Response.Write(b); %>
In visual studio, I cannot put any breakpoint on any server-side jscript lines or blocks, e.g. put a breakpoint on line 'var b = a + a';
However, it's okay for client-side javascript code deubgging. It becomes a big pain for me to debug such codes.
I want to know how to debug server-side jscript code or has any tools support such features?
Thanks.
All Replies
-
Monday, September 03, 2012 2:23 AMModerator
From Microsoft<sup>®</sup> Visual InterDev™ you can debug server script that executes on Microsoft<sup>®</sup> Internet Information Server (IIS). If IIS is running on your computer, you can debug server script in much the same way that you debug client script. If the server is on another computer, you can use remote debugging from your computer to find errors in the server script. For details, see Debugging Remotely.
You can debug server script in any of these ways:
- Run a page containing the script to debug from within your Microsoft Visual InterDev solution.
- Attach the Visual InterDev debugger to a process (page) already running in Microsoft<sup>®</sup> Internet Explorer.
- Respond to a syntax or run-time error in a script, called just-in-time debugging.
- Include a statement in script that starts the debugger.
Note To debug script in ASP pages, you must be running version 4.0 or later of Microsoft Internet Information Server (IIS).
Note If you are writing ASP pages that use the scripting object model, you can set options that help you find errors and trace events. For details, see Debugging Script Objects in ASP Pages.
If a Web page contains a mixture of client and server script, you can use the Visual InterDev debugger to debug both. For details, see Debugging Mixed Client and Server Script.
More information , please refer to : http://msdn.microsoft.com/en-us/library/aa242566(v=vs.60).aspx
Regards ,
Lisa Zhu [MSFT]
MSDN Community Support | Feedback to us
- Marked As Answer by Lisa ZhuMicrosoft Contingent Staff, Moderator Thursday, September 06, 2012 10:21 AM

