How can I find out what debugger is attached to w3p.exe - visual-studio-2010

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.

Related

VS2015: Remote Debug Azure Site

I cannot get Visual Studio 2015 to attach remotely to my Azure site. Or, rather, it attaches okay, but no breakpoints are ever hit.
I've confirmed I'm publishing a debug build. I tweaked web.config to require that.
I've confirmed remote debugging support for 2015 is activated within the Azure portal.
The site launches fine after the attachment...just no breakpoints.
This is an MVC6 site using rc1.
For the sake of other people struggling with this, it turns out VS2015, even with all the latest updates, isn't "aware" of dnx running under Azure. So it attaches to the wrong process on the Azure site.
After doing "Attach Debugger" within Cloud Explorer or Server Explorer, you must go into Debug -> Attach to Process, and do two things:
change the qualifier so it points at the remote Azure site
manually attach to the dnx.exe process
The first step seems to get "remembered" by VS 2015. The second step most definitely does not; you have to do it every time you do a remote debug attachment.
Also, you need to refresh the site in your browser after doing all of this for the debug cycle to start.
Here's a link that explains this a bit more: https://blogs.msdn.microsoft.com/webdev/2016/03/21/remote-debug-aspnet-core-on-azure/
Try downloading cloud explorer here
attach debugger as below
Enable debugging setting in azure portal with visual studio version as below
Attach remote debugger to w3wp as below
5 Make sure Debug must be = true
Make sure you deploy application to azure in debug mode

How to debug two web applications/services on IIS from within Visual Studio?

In Visual Studio 2010,
I want to debug two web applications running on IIS at the same time.
When debugging the first application it is ok. But when starting to debug the second application and first program is still in debug mode, Visual Studio prompts:
unable to start debugging on the web server. a debugger is already
attached
How can I solve this problem?
To summarize, one has to set different application pools in IIS for the two applications to debug.
Here is a rough instruction, given that both applications have been deployed to IIS once within Visual Studio.
Open the Internet Information Services (IIS) Manager
Click Application Pools on the left pane
On the right pane add another integrated application pool, let's name it Second ASP.NET 4.0 Integrated
For one application, open the Advanced Settings...
In the properties view finally select Second ASP.NET 4.0 Integrated as the application pool
This way the applications should be debuggable in parallel because each Application Pool spawns a new operating system process to which a separate debugger can be attached.
A windows process can only have one debugger attached to it at a given time. If you get that message it means that you're attempting to debug the same process twice which won't work. But that also means you should be able to debug both web applications in the instance of Visual Studio that's already attached. It may require a few extra steps though to get it to acknowledge the other code
Disable "Just My Code" (Tools -> Options -> Debugger, uncheck "Enable Just My Code"
You may need to manually load symbols for the other web application through the modules window (Debugger -> Windows -> Modules)
After that though (second step may not be necessary) you should be able to set break points in both web applications and otherwise debug them.

VS2010: "Unable to start debugging"

My VS2010 debugger has stopped functioning suddenly today on my Dell M4500. I had reinstalled VS2008 SP1 last week, but the 2010 debugger ran fine since then, so I'm not sure its the culprit.
I can launch a project once just fine, & afterwards I get a message that reads "Unable to start debugging," without any error # or explanation of why. Doing IISRESET doesn't help, I get the same message until I close VS with the entire solution and reload it. Here are some things I've tried:
Verified I have the latest project files
Repair option for VS2010
Complete uninstall/reinstall VS2010
Replaced Web.config with known good copy
Added localhost to the list of trusted sites in IE
Performed \aspnet_regiis -i in the 2.0 & 4.0 directories
Through IIS Services Mgr -> Default Website:
verified Enable HTTP Keep-alives checked
placed check in Integrated Windows authentication
Ensured Debug on "Any CPU" is selected
Tried building to Platform targets "Any CPU," "x86" & "x64"
Added DisableLoopbackCheck registry key entry in
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
Tested under both IIS & VS Development web server
Does anybody have any suggestions I can also try? Any help is very greatly appreciated!
Just a side note. I got a similar error in VS2013 trying to attach to chrome the error was:
Unable to attach the application 'chrome.exe' using XXX The 32 bit
version of the visual studio remote debugging monitor (msvsmon.exe)
cannot be used to debug 64 bit processes or 64-bit dumps. Please use
the 64-bit version instead
I had to untick "Silverlight" in the web project Web section:
I received this same message, preventing my web project from running and opening in a browser. Turns out another developer had made a change in the project properties to "Use Custom Web Server" which pointed to an external URL instead of to the web server on my machine.
Try this:
Right-click your project in Solution Explorer - click Properties - click Web tab - under Servers click "Use Visual Studio Development Server". For reference the usual port value here is "Auto-assign Port". Best of luck.
Here's why I got this error.
In Debug properties, verify that Start external program is not empty.
VS 2010 will warn you about it being empty, but will let you save it
I was trying to switch it from IE to Chrome, lost track of changes I was making, and spent an hour trying to figure out where this error was coming from.
I had the same issue but it worked when I switch Build => Platform target from x64 to x86.
Kindly turned off Debug Edit and Continue option
Turn on vs2010, run debug.
turn off debug, shut down all lunched webServers (i had few of them for different services)
Turn off VS2010
Turn on VS2010.
After that everything works perfect.

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