views:

425

answers:

3

I have problem to debug a simple Silverlight 2 application with Visual Studio 2008 SP 1. Sometimes, I could debug the Page.cs code and sometimes not. I have a web application, which hosts the silverlight .xap files.

Deleting the .xap files from ClientBin Directory and rebuilding works sporadic but not reliable.

I am frustrated.

+3  A: 

I see it frequently, too. What works always for me is to go to Web project property page, tab 'Silverlight Applications', delete the app and add it again. That seems to help 100% (ugly workaround, but...)

Srdjan Jovcic
Thank you: Ugly but 100% is good enough for me.
ChaosSpeeder
A: 

I found one very silly issue from myself: I have chosen Chrome as my standard browser. This is not the ideal browser, to develop silverlight apps.

ChaosSpeeder
A: 

I use Chrome for debugging my Silverlight application without problems.

The only trick is that visual studio attaches itself to the wrong Chrome process when lauching the application. This could be solved easily after launching the application by choosing in visual studio Tools->Attach to Process -> (select the Chrome process that has "Silverlight" specified in its Type column, for me it is "Silverlight, x86")->Attach

Refreshing the application in Chrome should make the breakpoints hit in Visual Studio.

Fayssal El Moufatich