views:

1317

answers:

4

Does anyone know how to debug a Silverlight 2 app running in Google Chrome from Visual Studio? Even after making sure that Chrome is the debugging browser, breakpoints are still not being hit.

+3  A: 

Have you tried attaching to Chrome manually? Tools > Attach to process?

Chrome isn't officially supported but there are hacks.

Here for example. Halo's comment may give you some help too.

TreeUK
Yes, I have tried attaching the chrome processes but no luck with that.
Steve Crane
Did you try Halo's comment? about starting Chrome in single process mode with (command line switch -single-process)
TreeUK
+3  A: 

You can have more than one browser running on your localhost. 1) Hit F5 to run debug. Probably opens IE or whatever your default is. F5 your way through the breakpoints until it's loaded. Leave this IE open. 2) Open your other browser, coping the localhost Url into the new browser and run it. New browser should hit the breakpoints.

This works with all browsers, and even emulators like BlackBerry emulators.

A: 

This is an issue with Visual Studio interacting with Chrome: http://code.google.com/p/chromium/issues/detail?id=45560. My guess is you need to wait for a Visual Studio patch, but I honestly wouldn't hold your breath. The majority of Silverlight developers just use IE or FF for debugging. (Apparently even FF has some issues now that they've sandboxed their plugins: http://timheuer.com/blog/archive/2010/08/16/enable-silverlight-debugging-in-firefox-visual-studio.aspx#20476). As much as I hate IE, it's really your best bet for debugging Silverlight apps.

Mike Post
A: 

Simply set SL app as startup prtoject instead of asp.net and press F5

Vitali Fokin