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
Related
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.
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.
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.
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.
I'm using Visual Studio 2008 to develop ASP.NET applications. Currently I'm debugging with running on IIS. I would like to switch to the development web server (Cassini) for debugging, so that I can use features like edit and continue. The reason that I'm not, is because the development web server only starts up when you are in debug mode. Is there any way to keep it running all the time, and just have Visual Studio attach to the existing server process like it does with IIS?
Rihan is partially correct...
In your Project Property page, Web tab: Enable Edit and Continue
If checked - The Development server will close when the app (not VS) stops.
If unchecked - Development server keeps running
You can also start your cassini server from the command line which takes alot of pain out of the whole "debug" effort...
Check out a good snippet here on how to do this: https://thoughtjelly.wordpress.com/2009/05/13/launch-cassini-from-the-command-line/
Once started, the built-in web server continues executing even when you stop debugging, as long as your VS2008 project is still open. Just start up the debugger when you want to start debugging again. I typically have another browser window open and interact with the built-in web server from there instead of the browser window that it opens so I can keep working with the application in the same state even after turning off the debugger (which closes the opened browser window).
I'm running VS2008 on Windows XP SP3.
The simplest way I have found to acheive that is by launching the debugger as normal. Then in Visual Studio goto the Debug menu, and select detach all. It detaches from the Cassini web engine, but it does not shut it down, as it does when stopping debugging.
I am quite sure you are know that there is command line swithces that you can you use to launch the cassini engine, but my guess is you are looking for something slightly easier.
Detaching does not close the browser window that visual studio launched, and if you do close that spesific web window then it will stop debugging.
I am running VS 2008 SP1 on Vista 64x SP1 without IIS.
Hope it helps
Rihan Meij
I have 3 web sites, with Single sign on between each site so I need to start all 3 with attach to process. However, there was no process to attach the debugger to, and whenever I started a project with F5 then stop it, the visual studio web server closed.
The Enable Edit and Continue option didn't change anything.
So to start the web server and keep it running so that you can attach the web project to the process, I simply did a "view in Browser" (ctrl+shift+W). This started the server process but not the project nor the debugger. I could then attach to process easily.
In Visual Studio 2015 you do this by going to Tools > Options > Debugging > General and unchecking the "Enable Edit and Continue" option: