Sunday, March 01, 2009

Building an application (4) ...

.. weird debugging problem

One more thing that I have encountered on my wonderful journey in building my first Silverlight application is a debugging issue.

It just not works straight out of the box in Visual Studio 2008. I know, I know, it must be me with all sorts of software loaded or what. Or the missing hotfix 98662654a. But just keeps biting me.

What's up, doc?

I start VS 2008 and make some very very clever changes or just want to try out something. So I set a breakpoint at the right line in the code and hit F5. Easy.

Lots of things happen. The application is built. Well, three applications are built: the Silverlight app, the web app and the web service. So far, so good.

I start my testing and the breakpoints are never hit. At least the IDE does not stop.

And yes, I am running in Debug mode.

What's the cure, doc?

I have found that stopping the debug session (by hitting Shift-F5 in the IDE) and the right-clicking the Web Service project and selecting Debug - Start New Instance does the trick.

Breakpoints are once more hit and they do cause the code to break at those points.

So, what's up, doc?

I honestly can see here that I have no idea. The trick above works for me and to me that is enough.

So, if you come across breakpoints never really breaking than the above trick might work for you.

Reblog this post [with Zemanta]