1

I have a WPF application with a WebBrowser Control. The WebBrowser loads a page with a Silverlight application. Is it possible to debug both applications together? How do I have to start the Silverlight application?

Edit: If I start the Silverlight solution, I can debug the code "in the Browser-Window". If I start the WPF solution I can debug the WPF Part but I can not debug the Silverlight in the "WPF-Window" - the code works but the breakpoints are ignored.

koalabruder
  • 2,794
  • 9
  • 33
  • 40

1 Answers1

0

You can debug both applications - the WPF WebBrowser control just needs to be pointed to localhost (via Webbrowser.Navigate) so you can easily attach to the SL app host process (IIS, IIS Express, etc. - or enable remote debugging support on your web server hosting the XAP). For WPF, just use F5 to auto-attach it.

SliverNinja - MSFT
  • 31,051
  • 11
  • 110
  • 173
  • I have edited my text. How can I enable remote debugging with the Visual Studio build in server? – koalabruder Sep 11 '12 at 13:38
  • If you start the debugger in the **WPF Solution** - use the VS Toolbar Menu in the **SL Solution** to [manually attach the debugger](http://msdn.microsoft.com/en-us/library/c6wf8e4z.aspx) to the built in VS server: **Debug->Attach To Process**. See [related SO post on attaching to webdev.webserver process](http://stackoverflow.com/a/7612282/175679). – SliverNinja - MSFT Sep 11 '12 at 13:45
  • Where do I have to attach the debugger of the SL solution? If I attach to WebDev.WebServer40.EXE I could debug the ASP.Net site but not the Silverlight project. – koalabruder Sep 11 '12 at 14:44
  • Try attacking this from the other side. Start debugging the SL Solution, and attach to your WPF application host. I know I've done it - I just don't remember the exact sequence of steps. – SliverNinja - MSFT Sep 11 '12 at 14:49