After browse internet to find how to debug Asp page, but it seems no good answer. So I list some tricks here.
It is easy to debug ASP pages Visual studio, which not only debug server side script and also client side script.We need set up the following things before we start Debug
1. Open Internet Explorer browser, in Tools-Internet options - Advanced -- uncheck disable script debugging
2. run inetmgr to open IIS manager, In Default web site properites -- home directory -- configuration --Debuggering , check the enable ASP server side debug and enable ASP client side debug.
3. Still in IIS manager, right click Virtual directory you will to debug, In Security Tab, check intergrate windows.
4.Open the Visual Studio 2005 or 2008 (There more things need to be done for VS 2003).In File - Open - Website, you can select the Virtual Directory you like to open .
5. Set startup page by right click the page in solution explorere. Then run your project. When Started, In Menu - Debug click "Attach to Process", when the new dialog opened you check show processes from all users, you will see a process called dllhost.exe whose user name is {your computer name}\IWAN_{computer name}User
6. Set the break point your code. When the page start, you can go to script explorer (under debug windows), you can set client side script as well.
7. Good luck
some tricks in Debug Client side script
One thing that irritated me sometimes is that studio 2005 has running documents moved to something called Script Editor. Its not enabled by default so you need to do the following in the Visual Studio 2005 IDE and sometimes it seems lost in VS2005
* Tools > Customize.
* Select the Command Tab
* Select Debug from the list, on the right hand side drag Script Editor somewhere.
This will enable you to have running documents which allow you to debug client side script. Start up the application in debug mode. Navigate to the page you wish to debug and then have a look in Script Editor. You will see all active documents that are on the client. Insert a breakpoint as you would with normal server side .