开发者

How to attach a debugger to a WebService?

I have 2 projects running on the same machine.(running in Windows XP)

  1. Windows Forms Application .Net 2.0 running in VS 2005
  2. A webservice(not WCF) running in .Net 4.0 in VS 2010

When I hit F5 in my webserivce runs in debug mode and is setup with IIS(So I guess it copies the new code to the IIS ...This is still on the same machine)

So I开发者_StackOverflow中文版 can have them both running in debug mode(by press F5). However the windows application calls this webservice up. When it does this I would like it to hit my break points in the webservice so I can debug.

I am not sure how to do this. I am not sure what I need to attach, Where do I attach it(through VS 2010 or VS 2005).


You can attach the Visual Studio debugger to a process by:

Debug > Attach to Process > Attach

Where after you select Attach to Process you browse the available processes for the one you're looking for. If you service is running in Debug with symbols, that should work. You can then put breaks in your code.


You can attach to all w3wp.exe processes (IIS app pools). This is done through the "Attach to process..." option in the "Debug" menu.


Open your WebService Project, choose "Debug"-"Attach To Process...". Select w3wp.exe and then click on "Attach"

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜