Problem with Classic ASP Breakpoints in Visual Studio 2005 - debugging

I am trying to set a breakpoint in an ASP page that isn't working correctly.
I am doing this in visual studio 2005 on Windows server 2008.
Whenever I try to set the breakpoint with the mouse, the IDE opens up a different page and sets a breakpoint somewhere in that page. I don't know why it is doing this.
I have better luck setting the breakpoint using F9, but those breakpoints don't get hit, anyway. The breakpoints that are set in the page that visual studio opens automatically are getting hit, but this doesn't help me, because I don't need to debug that page!
This is my first time debugging classic ASP, so I could use some help.
Thanks

I've just tested debugging of classic ASP in VS 2008 on server 2008 and it works fine. I haven't got VS2005 to test it on that.
However if memory serves I've seen this problem when the root folder for the web site project (and you are using a web site not a web application project right?) and the Home directory path in the IIS configuration. E.g., the VS solution points to an UNC path whereas the IIS points to a physical drive. In this case VS can't marry up the file path of the script in the ASP process with the file path of source code in the solution.

In VS.NET:
project - properties
configuration properties
debugging
- enable ASP debugging
- enable ASP.NET debugging
In the IIS snap-in:
default Website - properties
home directory tab
configuration
app debugging
- enable ASP server-side script debugging
Website (the project you want to debug) - properties
directory tab
application name: add
Add IIS process account to Debugger Users group:
In Computer Management snap-in:
System Tools
Local Users and Groups
Groups
Debugger Users - properties
Add user IWAM_machine-name (the "Launch IIS process account")
Now, to debug in VS.NET:
right-click the .asp page that the application should start from
select "Set as Start Page"

Related

Debugging server-side ASP classic in VS 2012

Following this answer I am able to connect to an IIS Express instance with debugging.
However, I am only able to place breakpoints in a small set of my ASP pages, as shown in the VS2012 Solution Explorer while the debugger is attached to the website's IIS Express process:
These are basically the first ~20 ASP files in the site's directory hierarchy.
If I try to put a breakpoint in any other ASP file in the solution I get a tooltip message:
The breakpoint will not currently be hit. No symbols have been loaded
for this document.
How do can I enable breakpoint debugging in all ASP files in the website?
You can use the STOP keyword in classic ASP. Wherever you write this in VBS code the server will stop and prompt you to attach a Visual Studio debugger, which will then give you full visibility into the running source file.
In order to do this you need to configure IIS to allow Server side Debugging.

Debugging asp classic on IIS6

I'm trying to debug an old asp web site on a windows server.
actualy I don't have any project files (there is no visual studio project file), what I have is only web pages in a directory ... I can run this latter on a IIS6 and everything works fine, the problem is that when I try to run those pages in a debugging mode nothing happens!
I enbabled the debugging mode on the IIS and I attached this latter's process to the visual studio (I'm using VS2005) I set the breack points... but nothing happens even if I ran those pages code the compile doesn't stop!!
I saw several pages talking about this topic... but I wasn't able to find a solution... do you have any idea?
(I want to add that the web pages, the IIS and the Visual studio ide are on the same server and I'm connected with the administrator session)
Make sure you when attach to set it to attach to Script code only and the break points must be within server-side code.

How can I find out what debugger is attached to w3p.exe

I'm trying to setup debugging on a class ASP project in VS 2010, and in doing that am trying to attach it's debugger to w3p.exe. I'm using Windows 7 64-bit and IIS 7.5. I've used this method successfully a few times before on another machine.
However, I'm finding that this time I am unable to attach the debugger. It's saying:
Unable to attach to the process. A debugger is already attached.
But I can't figure out what it might be. How can I determine this? Or could it be something else? I've rebooted my PC and can't yet see signs of anything running which looks like a debugger.
Setup
In case it helps, here's the steps I used to setup the environment, which I documented from my previous successful attempts:
Created new empty Visual Basic .NET Web (Best to create in C:\inetpub\wwwroot\, otherwise you will have security/ACL issues when loading the site).
Copied the contents of site folder to project folder.
In solution explorer, selected to show all files not in project. Selected all files and right click and select: "include in project".
Under project properties -> Web -> Set to use IIS and start with URL http://mysite.local
In hosts file pointed mysite.local to 127.0.0.1
In IIS setup new website pointing to the files with a host header of mysite.local
Go to application pools, ensured mysite.local was set to classic mode. No managed code.
Under ASP -> Enable Parent paths and make sure server-side debugging is enabled
Under error pages, make sure full details are shown.
Debugging in Visual Studio 2010
Run VS 2010 as Administrator
In your project, use Ctrl+F5 to run without debugging
Now, in the menu go to Debug -> Attach to Process -- This is where I fail
Tick show processes from all users AND show processes in all sessions
Make sure it is set to automatically determine type of code to debug
Look through the w3p.exe processes in the list, and based on the IIS POOL\site name, pick the right process.
Set your breakpoints and refresh -- debug as normal.
Are you having some Debug Diagnostics Tool running on your machine. Sometimes back i had the same problem the Debug Diagnostics Tool was debugging my w3p process.

Getting error while trying to run a classic ASP website in Visual Studio 2010

I have a classic ASP website deployed over IIS.
I am opening that website from the same location in visual studio 2010 (in order to debug, as per the steps mentioned here
The problem is that, when I hit F5 in visual studio it is giving me an error saying "your server does not support debugging of asp net or atl..."
I am able to browse the site from IIS, but I want to open it in Visual Studio in order to debug it.
What could be the possible reason and solution of this issue?
F5 doesn't do anything good for classic ASP sites (f5 will try to compile a .NET site and then access it).
I will assume that you are trying to debug the site on the same machine where it's running. The way you debug "classic" ASP using Visual Studio.NET is by attaching to the process running the site. The easiest way to do this is to use the Just In Time (JIT) feature: insert a stop statement in the code (debugger in jscript) - hitting that line should initiate a server-side "Error of type "Script Debugging" was encountered. Do you want to debug?" dialog, with suggestions of available debuggers to use.
Try this and report what happens - there might be some extra steps needed to configure that machine.
Are you using IIS 7?
If so you should the server option "Enable server side debugging"... It should be in the properties window of the site, using IIS Management Console.
Once you do that, when you run the server through Visual Studio, it should open another solution on debugging mode with the relevant code.

Debugging Classic ASP in Visual Studio 2010

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?
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
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:
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.
Access to the IIS administration.
Locate your WebSite, then access the ASP configuration.
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

Resources