Derik Whittaker

Syndication

News


My Silverlight Breakpoints are not being hit….How To Resolve this

Today I was working on a Silverlight 4 side application and for some odd reason my breakpoints were not being hit when I was debugging.  I took what I thought were the right steps to resolve the issue.  I …

  • Killed the development web service
  • Killed and restarted Firefox (3.6.4)
  • Killed and restarted VS 2010

Sadly none of these options worked……hum

Next I hit up google for an answer.  My blogger in crime Chris Bennage has a similar post here that I read through, and tried.  However, this did not resolve my issue.  However when reading through the comments someone said something that sparked a thought.  That was to attach the debugger to the browser.  So I tried this, however that also did not work, but I was on the right track.

In order for ME (and please note you may have a different end result than I did here) was to do the following.

  1. Start the project without debugging so it would open up in the browser
  2. Open up the Attach to Process dialog in VS
    image
  3. Change the ‘Attach to’ options and explicitly check Silverlight (this option may not be needed, but hey it worked)
    image
  4. Scroll down in the Process dialog until you find something that has the type set to ‘Silverlight’, If it says 'plugin-container.exe’ then you are on the right one (this is what the silverlight plugin runs in when running Firefox).
    image
  5. Click Attach
  6. Debug away

Now again, this worked for me, this may NOT work for you.  Also, there may be a better way to do this, but this works until I can find the root cause.

Till next time,


Posted 06-25-2010 3:35 AM by Derik Whittaker
Filed under: ,

[Advertisement]

Comments

Henning Anderssen wrote re: My Silverlight Breakpoints are not being hit….How To Resolve this
on 06-25-2010 6:33 AM

I struggled with similar issues when I developed a SL 2 client in a previous project. And I mean, I had a really hard time figuring it out.

From my experience, the SL client didn't always compile right, or at all, so I'd end up with source code that was newer than what is running. Sometimes it would help to clean the solution and rebuild everything, multiple times. Sometimes it suddenly worked. Other times I spent hours trying to fix it.

Not sure how it is with SL 4 and VS 2010, but I don't think things have changed all that much. Never again Silverlight development.

tugga wrote re: My Silverlight Breakpoints are not being hit….How To Resolve this
on 06-25-2010 7:50 AM

So did this work with and the problem was only with FF?

Rob Eisenberg wrote re: My Silverlight Breakpoints are not being hit….How To Resolve this
on 06-25-2010 8:52 AM

Bennage and I have this issue repeatedly. I'm not sure what causes it. I can normally fix it with one or two approaches.

1. Go to the settings for your Web project, Debug tab. Make sure that Silverlight is checked there. If not, check it and see if that fixes the problem.

If that doesn't work:

2.  Close VS. Delete all bin, obj and .user files. Restart VS. Run your project. You should see a prompt asking you if you want to debug Silverlight...select Yes :)

Nishank wrote re: My Silverlight Breakpoints are not being hit….How To Resolve this
on 07-16-2010 2:47 AM

Hey! that Attach to process soln worked 4 me also..i was really tired searching 4 that working solution...but  still i want that i don't have to do attach process everytime i debug..there should be some permanent way to accomplise that

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco
NServiceBus
RavenDb
Web Sequence Diagrams
Ducksboard<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)