Debug JavaScript/VB Script programs (ASP)

Source: Internet
Author: User
Tags website performance

In the Article debugging JavaScript/VB Script script Program ( wscript ) some netizens asked me how to debug Asp inside the foot In this program, I don't know if he is asking for debugging Asp VBScript ASP Code , or Asp. net JavaScript/VBScript client code in the webpage, so in this article, I will first debug Asp the Asp code in the webpage can be explained in this case.

estimation Asp there are very few people playing this game, but many old websites still use Asp for technical production and maintenance, you still need to debug and modify the Asp webpage code. Although Asp most of the webpage code is VBScript or JavaScript , many DHTML the code is also written in JavaScript/VBScript , which can easily mislead programmers, the two are both running on the browser, but they are not.

ASPWebpage code runs on the server, specificallyIISWhy?IISCan be executed simultaneouslyASPWebpage andASP. NETWebpage code, if I tell youIISYou can also executeJSPCode, do you believe it? Of course,IISHow to executeASP,ASP. NETAndJSPYou can open a series of articles to explain the code.

WhileDHTMLThe code is on the browser side (IEOrFirefox). Different execution methods of the two codes determine different debugging policies.

To sum up, the two are different things, but they complement each other and are inseparable ......

For debuggingASPWebpage code, you need to debugIISWorker Process (notIISADMINThat process), inIn IIS 6.0Medium,IISThe workflow name isW3wp.exe(World Wide Web process), InIn IIS 6.0It seems likeDllhost.exe. BecauseIn IIS 5.0There are not many users.-The main reason is that I don't need it anymore, so this article usesIn IIS 6.0As a platform.

Because opening the debugging support will affect the website performance-That is, the response speed. Therefore, by default,IISSetASPThe debugging function of is disabled:

1.OpenIISManagement Interface (IIS ManagerOrIisadmin.exe).

2.Right-click the website you want to debug, for example (Default web site)".

3.Click "Home Directory (Home Directory), Click "Configure (Configuration)".

4.Select "Debug (Debugging) Tab.

5.Set the "Debug flag (Debugging flags), As shown in:

6.StartVisual Studio, Click "tool (Tools)"-"Attach to process...(Attach to process...)".

7.In the "select process (Available Process) Dialog box, selectW3wp.exe(Note: Select "type (Type) Column as "script,X86(Scripting, x86").

 

If you do not seeW3wp.exePlease visit the website first-Because the website may have restarted, and then click "attach to process"...(Attach to process...)" The "refresh" button on the dialog box.

 

If you still do not seeW3wp.exe, Select "display all user processes (Show processes for all users) And show all sessions of the process (Show processes in all sessions) ", And then click Refresh.

 

If you still don't see it, then ......

A)Or go back to Step 1 and try again.

B)GreetingsVisual StudioLet's go back to bed and forget this article.

The current effect should be similar:

8.Unfortunately, the currentVisual StudioYou can only set function breakpoints.2008The breakpoint cannot be set directly on the code line.

9.ClickVisual Studio"Debugging (Debug)"-"Window (Windows)"-"Breakpoint (Breakpoints.

10.Then click "function breakpoint (Break at function...), As shown in:

11.Enter-Testfunction, As shown in:

12.BackIEInside, refresh the pageAt this time, you should be ableASPDebugging, as shown in:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.