Application debugging is disabled in Visual Studio 2012 on classic ASP debugging

I would like to debug a Classic ASP Visual Studio 2012 site using IIS Express . Therefore, I attached iisexpress.exe in VS 2012 , but it shows Application Debugging is disabled . What could be the problem? Should I include any configuration settings?

enter image description here

+7
debugging visual-studio-2012 asp-classic iis-express
source share
4 answers

I don't have a visual studio 2012 to test it, as far as I know, a visual studio cannot debug classic asp code natively. The way I am debugging my classic asp code is to put the stop instructions in a line above the one I want to debug, as this post says . a breakpoint just prints at a stop.

 function DoDate(inp) stop if isnull(inp) then DoDate = "Never" exit function end if 

In the above example, the page at loading stops at the breakpoint and opens a dialog box asking if you want to debug it, then you can go through this function and even see the variables as usual.

note: the link says visual studio 2005, but it also works in 2010 (and should also work in 2012), you also don't need the DEBUG extension.

also make sure that you have server-side debugging enabled in IIS, or it will not work.

+2
source share

First of all, you need to enable server-side debugging of the classic ASP script. Do this by running the following commands:

 "C:\Program Files (x86)\IIS Express\appcmd.exe" set config "[YOUR_SITE_NAME]" -section:system.webServer/asp /appAllowClientDebug:"True" /appAllowDebugging:"True" /commit:apphost 

Where [YOUR_SITE_NAME] is the name of your site. You can find this name by opening:

 %USERPROFILE%\Documents\IISExpress\config\applicationhost.config 

... and search for your site.

Then start the IIS Express instance from the command line:

 "C:\Program Files (x86)\IIS Express\iisexpress.exe" /config:c:\users\kevin\Documents\IISExpress\config\applicationhost.config /site:"[YOUR_SITE_NAME]" /apppool:"Clr2IntegratedAppPool" 

Again, [YOUR_SITE_NAME] is the name of your IIS Express website.

Then attach the Visual Studio 2012 debugger and set a breakpoint in the script that you want to debug. Go to your site / script and you should see a breakpoint light up:

enter image description here

+7
source share

Go to IIS -> ASP -> Debug Properties -> enable client and server side debugging

then attach the w3wp process from VS2012

+1
source share

I like to use full-blown IIS on my development computer, just like my web servers are running, and in the past it had problems with the differences between Casini and IIS.

Anyway, I could not do it the way @Kev suggested. I played a little + reading and found that in the "Attach to process" window, you need to specifically select the "Script Code" in the "Attach to:" option.

 1) F9 to set breakpoints in code 2) Ctrl-Alt-P to attach to process 3) Next to "Attach To:" click on the "Select" button 4) Select "Script Code" 5) In my case, attach to "w3wp.exe" 

Enjoy debugging your code.

0
source share

All Articles