Debugging server-side ASP classic in VS 2012 - debugging

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.

Related

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.

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.

Classic ASP debugging frame content in frameset with VS2010 IIS 7

Im trying to step through a classic asp page which is hosted in iis7 in Visual Studio 2010. Ive followed a few blogs, mainly these ones:
"http://blogs.msdn.com/mikhailarkhipov/archive/2005/06/24/432308.aspx"
"http://social.msdn.microsoft.com/Forums/en/vsdebug/thread/eff76bd0-6421-4ba5-b063-a348eec27ebb"
It seems that the breakpoint I set is not hit when I browse to the page in question, I think this is because the application is all in frames. When monitoring the process in sql profiler it looks like all session information is gathered once the page starts up, having been browsed to from iis7, after I log in using the login page it doesnt actually get any more information.
Has anybody got any tips for debugging frames in classic asp with VS2010 and iis7?
UPDATE: Turns out there was a hidden setting in the database that meant when I ran the application up it was going to a different system.... which would explain why it wasnt hitting the code - Visual Studio 2008 actually told me in advance that the breakpoint wouldnt be hit.
i'm using the vbscript keyword "stop" in my source code. this is just like a breakpoint in visual studio. a window pops asking you which debugger you want to use, select visualsudio 2010 and you're fine...
you have to set server debugging to true in iis 7 (asp section)

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

Problem with Classic ASP Breakpoints in Visual Studio 2005

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"

Resources