Skip to main content
Home Forums General Silverlight Installation and Setup Can't debug file in msvs
11 replies. Latest Post by sladapter on June 15, 2008.
(0)
Valkon
Member
0 points
7 Posts
06-14-2008 3:45 PM |
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
Star
8320 points
1,546 Posts
06-14-2008 5:43 PM |
Are you using Vista as your OS and opening VS as an Administrator?
06-14-2008 6:39 PM |
Yes and yes.
06-14-2008 7:43 PM |
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
All-Star
17441 points
3,172 Posts
06-14-2008 9:18 PM |
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.
06-14-2008 9:57 PM |
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.
06-14-2008 10:07 PM |
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.
06-15-2008 2:46 AM |
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.
06-15-2008 3:04 AM |
And the Browse With option acts the same as if IE was not my default, even if it's default in MSVS
06-15-2008 10:23 AM |
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?
06-15-2008 6:30 PM |
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.
06-15-2008 7:55 PM |
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?