Visual Studio: Cannot Step Into WCF Service Hosted In IIS

If you are reading this then you are probably a complete newbie like myself to WCF. Never mind. We can huddle here together for warmth.

So in my case I had a WCF Service running on localhost under IIS and a Client that consumed that Service running under Cassini. There was a Breakpoint in my Client code on the call to my WCF Method and when I hit that breakpoint and hit F11 then the debugger would step into it as obediently as Frankenstein’s Monster on an assassination mission. I was as smug as a 200kg Tabby Cat locked in a Cream factory over the Christmas holidays.

My client app and my WCF app were in different solutions and open in different instances of VS2008.

Then I made my critical mistake – I went to Lunch.

During my absence tiny invisible super-intelligent Manta Rays from the Planet QUARX sabotaged my apps so that I could no longer step into the WCF code from my client. My Team Lead could not figure out why either.

Well about 96 Google Minutes later I found this hyper-simple solution (remember, we’re newbies here) on TroubleShootingWiki.org.

I slavishly did what they suggested which was in the VS2008 instance hosting my WCF Solution, select Debug from the main menu and…

select process aspnet_wp.exe from the list of available processes, and click the Attach button. You will find this process attached to the debugger. Open the HelloWorldService.cs file and set a breakpoint if you haven’t done so already. Now run the HelloWorldClient program…from another Visual Studio instance…and you will see that the breakpoint is now hit.

Good news: The tiny hyper-intelligent Manta Rays are gone and the Tabby Cat is back. Pass me the Triple Fat thanks.

Advertisements

Tags: , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: