Skip to main content

Microsoft Silverlight

Can't debug file in msvsRSS Feed

(0)

Valkon
Valkon

Member

Member

0 points

7 Posts

Can't debug file in msvs

Hello!

I'm having some trouble debugging silverlight in visual studio.  The breakpoints always say that the symbols haven't been loaded, but even if I try to delete the pdbs and clean/rebuild they say the same thing.  This only happens in the silverlight section of my project - I can debug into the non-silverlight code and it works fine.  I am using IE7 and the process is attached for debugging via msvs.

Any help would be most appreciated.


-V
 

swildermuth
swildermuth

Star

Star

8320 points

1,546 Posts

Re: Can't debug file in msvs

Are you using Vista as your OS and opening VS as an Administrator?

(If this has answered your question, "Mark as Answer")

Shawn Wildermuth
C# MVP, MCSD, Speaker and Author

Silverlight 3 Workshop
Miami, FL: Oct 12-14th
Portlant, OR: Dec 2-4th
Atlanta, GA: Dec 7-9th
http://silverlight-tour.com

Valkon
Valkon

Member

Member

0 points

7 Posts

Re: Re: Can't debug file in msvs

Yes and yes. 

Valkon
Valkon

Member

Member

0 points

7 Posts

Re: Re: Re: Can't debug file in msvs

So it turns out that the only way to get the debug points to get recognized is to have IE7 be my default web browser - I was originally setting up iexplore as the executable to run the specific page.  I'm a Firefox user and so would like to keep my default web browser as firefox - in fact the debugging works much better in firefox (ie, it the debug points hit).  But I would still also like to be able to debug with IE7 without having to set it as my default browser.  Any ideas?

sladapter
sladapter

All-Star

All-Star

17441 points

3,172 Posts

Re: Re: Re: Can't debug file in msvs

Just right click your start page (SilverlightTestPage.html/aspx) then open browse with window, select Firefox as your default browser (this will only affect VS), and when you want to switch back to debug in IE, just do the same thing. Then you hit F5 you will be debugging in Firefox.

 

 

 

sladapter
Software Engineer
Aprimo, Inc

Please remember to mark the replies as answers if they answered your question

Valkon
Valkon

Member

Member

0 points

7 Posts

Re: Re: Re: Re: Can't debug file in msvs

Yea... I know how to switch which engine I want to debug in... the problem is that I don't WANT to debug in Firefox (it doesn't really work very well and its a lot slower).  I want to debug with IE7 but not be forced to set it as my default browser.

sladapter
sladapter

All-Star

All-Star

17441 points

3,172 Posts

Re: Re: Re: Re: Can't debug file in msvs

That setting only affect the debugging in VS. So if you want to debug IE7, then set it to IE7, But Firefox will still be your default browser for your normal use.

 

 

sladapter
Software Engineer
Aprimo, Inc

Please remember to mark the replies as answers if they answered your question

Valkon
Valkon

Member

Member

0 points

7 Posts

Re: Re: Re: Re: Re: Can't debug file in msvs

Right... but like I said before, if I don't have IE7 as my default browser, the debugging doesn't work at all, and I'm wondering why that is.

Valkon
Valkon

Member

Member

0 points

7 Posts

Re: Re: Re: Re: Re: Re: Can't debug file in msvs

And the Browse With option acts the same as if IE was not my default, even if it's default in MSVS 

sladapter
sladapter

All-Star

All-Star

17441 points

3,172 Posts

Re: Re: Re: Re: Re: Re: Can't debug file in msvs

I just tried to debug in Firefox using attach to process option. Here is what I did:

1) I clicked "browse with", select Firefox, click browse button. The page opened in Firefox.

2) I come back to VS select "attach to process" under Debug, select the Firefox instance that opened my page. make sure the attach to box is displaying "Silverlight code". Click attach button. 

3) I refresh my page in the browser, the break point I set in App.Xaml.cs is hit.

Are you doing the same thing?

Have you tried using F5 ("Start Debug") instead of using "Attach to process"? Does that work for Firefox?

 

 

 

sladapter
Software Engineer
Aprimo, Inc

Please remember to mark the replies as answers if they answered your question

Valkon
Valkon

Member

Member

0 points

7 Posts

Re: Re: Re: Re: Re: Re: Re: Can't debug file in msvs

 I don't want to debug in Firefox...

I've done those steps you've outlined in both firefox and IE, everything works fine in firefox, but IE still doesn't hit the breakpoint.

As to using F5 - I've tried F5 and it doesn't work for IE.

sladapter
sladapter

All-Star

All-Star

17441 points

3,172 Posts

Re: Re: Re: Re: Re: Re: Re: Can't debug file in msvs

I when I first try to attach to IE,  the "Attach to" box is default to Script code (because by default it uses auto detect mode, it will attach to Script debugger instead of Silverlight debugger). I have to manually select the debugger for Silverlight code using Select button. Make sure you have made this selection.

But F5 should always work. Did you try to remove your Silverlight link from your Web project and re-add it back?

 

 

 

sladapter
Software Engineer
Aprimo, Inc

Please remember to mark the replies as answers if they answered your question

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities