Debugging Classic ASP in Visual Studio 2010

2019-01-14 12:10发布

I have read this question and this page linked to in the question, as well as dozens of other articles about debugging asp classic with VS but it's still not clicking for me.

I am using VS 2010. The files I want to debug live on a remote server. I have installed the Remote Debugger on the server. I opened the website and attached to the w3wp.exe process on the remote machine. I created some breakpoints but I am still getting "The breakpoint will not currently be hit. No symbols have been loaded for this document" on those breakpoints. Is that the problem or is that a symptom of a larger problem with what I am doing?

2条回答
男人必须洒脱
2楼-- · 2019-01-14 12:31

First, by default, when you open a web site in Visual Studio, you're opening it via the file system, not via IIS. If this is the case, then Visual Studio uses the internal Cassini web server, rather than IIS.

The Cassini web server does NOT run classic ASP. IIS does. So the first thing you need to do is figure out how to debug in IIS.

It should go without saying, you need to have IIS installed on the machine you're working with, and have the web site you're debugging set up the same as it would be on the server. (so you should be able to run http://localhost/somepath and be able to see your site)

You also need to attach to the running process of Internet Explorer. There's a link to that as well.

Next, you need to get Visual Studio to attach to IIS and execute the web site rather than use the built-in web server and enable debugging.

That's covered here: This topic is no longer available (which is the first child link of the page you liked to in your question here.

From there, you should be able to follow the remaining links and get up and running.


Edit - added

This article takes you through it step-by-step. Debugging Classic ASP ( VBScript ) in Visual Studio 2008

查看更多
虎瘦雄心在
3楼-- · 2019-01-14 12:41

I've just had this problem when trying to debug a classic ASP application in VS2012.

There's no need to copy PDB files, because there aren't in this kind of projects, so follow this steps:

  1. Be sure that ASP compatibility is turned ON in your IIS installation (Control Panel -> Enable/Disable Windows features -> Internet Information Server). You can install all features if you want to be sure.
  2. Access to the IIS administration.
  3. Locate your WebSite, then access the ASP configuration.
  4. Find "Debugging properties" and then enable client and server debugging. You can also enable error sending to the browser.

After that, just attach the VS2012 debugger to the "w3wp.exe" process. DEBUG -> Attach to process....

This will work for local debugging. If you want to do remote debugging, you must prepare the remote server to allow remote debugging (TIP: Use the same user in both, server and your machine, and be sure it has enough privileges). For more information take a look at:

Installing the Remote Tools

Debugging Classic ASP ( VBScript ) in Visual Studio 2008

查看更多
登录 后发表回答