Cannot debugging asp.net on IIS7 by attaching process w3wp
NickName:max Ask DateTime:2011-03-07T22:55:37

Cannot debugging asp.net on IIS7 by attaching process w3wp

I have a asp.net website in VS2008 which I have pre-compiled in local directory which is virtual directory for IIS 7(http://machinename:83)

when i 1. launch http://machinename:83/ 2. VS2008-->debug-->Attach to Process..-->select w3wp.exe 3. set the breakpoint in code in VS2008 4. run app

while i found it cannot go to the breakpoint. (i m sure the breakpoint must be run)

anybody can help me on this?

Copyright Notice:Content Author:「max」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/5221129/cannot-debugging-asp-net-on-iis7-by-attaching-process-w3wp

Answers
Josh Pearce 2011-03-07T15:05:29

What you're doing should work, but you can try this, which is frequently used to debug Windows services upon startup:\n\nSystem.Diagnostics.Debugger.Launch();\n\n\nJust put it on the line where you want to start debugging, and the OS will prompt you to attach.",


David J. 2012-01-03T14:27:16

If you are using the Publish Web Site feature in Visual Studio, then make sure that the 'Emit debug information' checkbox is checked.",


OBender 2014-03-01T17:10:44

Please endure you don't have Optimize Code option tuned on, in the web config and in the Property's -> Build -> Optimize code is OFF\n\n\n\nin web.config\n\n <compilation debug=\"true\" batch=\"true\" optimizeCompilations=\"false\" />\n",


marquito 2012-03-01T13:20:45

make sure your web.config is set with \n\n<compilation debug=\"true\">\n",


More about “Cannot debugging asp.net on IIS7 by attaching process w3wp” related questions

Cannot attach debugger to w3wp

I'm debugging an ASP.NET application but sometimes cannot find w3wp neither in Visual Studio process list (Menu: Debug -&gt; Attach to Process...) nor in task manager. I have selected 'Show processes

Show Detail

How do I configure the Out Of Process Session Provider? (ASP.NET - IIS7)

I'd like to experiment with the out of process session provider in ASP.NET/IIS7 (non-in memory). I understand that then a different process is taking care of my session state, so that I could resta...

Show Detail

Cannot debugging asp.net on IIS7 by attaching process w3wp

I have a asp.net website in VS2008 which I have pre-compiled in local directory which is virtual directory for IIS 7(http://machinename:83) when i 1. launch http://machinename:83/ 2. VS2008-->deb...

Show Detail

ASP.Net Worker Process Freezes when Debugger is Attached

I see a lot of questions for Visual Studio hanging when attacking the debugger. Mine is the opposite (maybe). When I attach Visual Studio 2010 to a remote w3wp process, the w3wp process hangs.

Show Detail

Moving an ASP.NET project to .NET 4

I'm moving an ASP.NET project from .NET 3.5 to .NET 4. Everything works beautifully if I'm debugging under web.dev (ie. in Visual Studio [2010]) but as soon as I try and run this under IIS7[.5] the

Show Detail

Attaching to w3wp using mdbg

I am trying to attach to the w3wp process using the command line managed debugger (mdbg). I am not able to see the process in the list of processes with the "a" command. I am sure that the proble...

Show Detail

high cpu useage on w3wp process

I am encountering an issue with my asp.net c# web application where the server is hitting very high cpu useage eg. 80%+ on w3wp process. This has only happened recently after I made numerous chang...

Show Detail

Cannot debug IIS deployed ASP.NET Core MVC on full .net framework

I am stuck for over an hour already trying to debug my ASP.NET Core MVC application. It is using Full .Net Framework 4.6.1 Debugging using IIS Express works like a charm, but when deploying the pr...

Show Detail

Debugging Azure: Error attaching the debugger to the IIS worker process

I have a web application asp.net to deploy to Windows Azure. I try to run it on local first. But when debugging, I catch this error from VS2010: "There was an error attaching the debugger to the ...

Show Detail

Debugging production JavaScript

Please see the code below: function TestAjax { //AJAX asynchronous call 1 //AJAX asynchronous call 2 //AJAX asynchronous call 3 //AJAX asynchronous call n } There are n AJAX calls to ...

Show Detail