开发者

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开发者_StackOverflow中文版. 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?


What you're doing should work, but you can try this, which is frequently used to debug Windows services upon startup:

System.Diagnostics.Debugger.Launch();

Just put it on the line where you want to start debugging, and the OS will prompt you to attach.


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


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

Cannot debugging asp.net on IIS7 by attaching process w3wp

in web.config

  <compilation debug="true" batch="true" optimizeCompilations="false" />


make sure your web.config is set with

<compilation debug="true">


If you are publishing, make sure that you are publishing with debug configuration (was my case on VS-2015)

Cannot debugging asp.net on IIS7 by attaching process w3wp

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜