In VBScript, the Stop statement can be used to start a breakpoint.
Response.Write "a line" Stop Response.Write "a line after the breakpoint
I assume this is a local IIS7 instance that you want to debug. On my computer, when I try to load a sample page with the Stop statement, I get a Visual Studio Just-In-Time Debugger popup. You will need to provide administrative privileges to debug the page.
You may also need to enable server-side debugging in the "ASP" applet in IIS Manager, but when I checked just now, server-side debugging was set to False on my machine.
If you do not mind running Visual Studio with administrator privileges (or are already running), you can also try the following:
- Use the command "File → Open Website ..." to open the website (in the "Local IIS" section).
- In Solution Explorer, open the files you want to debug and set breakpoints.
- Launch the debugger by selecting the menu item "Debugging → Attach to process ...". Select the process "w3wp.exe".
- Now, when you try to load a page in your browser, Visual Studio will stop at any breakpoints.
Also note that if you make changes to the pages, the changes will be saved to disk. At work, I use VS2005 in the same way as my editor-in-chief for classic ASP, precisely because I can easily set breakpoints.
A third option that I have not tried yet may be the recently released IIS Express . It should be designed specifically for developers who do not have full administrator rights, so you may not need a promotion invitation for debugging. I will update my answer if I have the opportunity to try it in the next few days.
source share